Commit 680feda
fix: guard against undefined currentModelOption in effort selector
When a model stored in localStorage doesn't exist in the current
provider's model list (e.g. switching from Bailian's qwen3.5-plus to
Kimi which doesn't have it), currentModelOption could be undefined,
crashing with "Cannot read properties of undefined (reading
'supportsEffort')".
- MessageInput.tsx: add optional chaining on currentModelMeta access
- useProviderModels.ts: fall back to DEFAULT_MODEL_OPTIONS when
provider's models array is empty
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 16326c4 commit 680feda
2 files changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
0 commit comments