Commit 1ee3ecb
committed
fix: preserve selected OpenRouter models not in cache
When the OpenRouter model cache refreshes, preserve the user's currently
selected model even if it's not in the API response. This prevents newer
models (gpt-5.1, gemini-3, grok-4.1-fast, etc.) from being marked as
invalid and automatically switching to Claude Sonnet.
The fix adds the selected model to the models list with default values
if it's missing, allowing continued use of models that aren't yet in
the OpenRouter API response.
Fixes #95971 parent 099ea6d commit 1ee3ecb
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
915 | 932 | | |
916 | 933 | | |
917 | 934 | | |
| |||
0 commit comments