Commit 4bd4b83
authored
fix(llm): use generic model fields in frontend instead of OllamaModels (#1093)
The frontend index page indexed cfg.OllamaModels[0] directly, which
panics with "index out of range [0] with length 0" when LLM_PROVIDER
is not ollama (config.go only populates OllamaModels for the ollama
provider). The CLI already uses cfg.LLMModelsList / cfg.ModelName,
so align the frontend with the same generic fields.
Also mark the configured MODEL_NAME as the selected option in the
dropdown so the initial display matches the user's .env choice.
Closes #10721 parent 6f86c7f commit 4bd4b83
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments