| 1938 | } | 1938 | } |
| 1939 | }); | 1939 | }); |
| 1940 | | 1940 | |
| | 1941 | // Merge static models into model_list |
| | 1942 | staticModels.forEach(modelId => { |
| | 1943 | if (!model_list.some(model => model.id === modelId)) { |
| | 1944 | model_list.push({ id: modelId }); |
| | 1945 | } |
| | 1946 | }); |
| | 1947 | |
| 1941 | const selectedModel = model_list.find(model => model.id === oai_settings.google_model); | 1948 | const selectedModel = model_list.find(model => model.id === oai_settings.google_model); |
| 1942 | if (model_list.length > 0 && (!selectedModel || !oai_settings.google_model)) { | 1949 | if (model_list.length > 0 && (!selectedModel || !oai_settings.google_model)) { |
| 1943 | oai_settings.google_model = model_list[0].id; | 1950 | oai_settings.google_model = model_list[0].id; |