Commit 6b51449
fix: prevent model selector label degradation after first conversation
After the first conversation, captureCapabilities() caches the SDK's
supportedModels() which have different displayNames ("Sonnet", "Opus 4")
than our catalog ("Sonnet 4.6", "Opus 4.6"). The /api/providers/models
route was using m.displayName directly from the SDK cache, overriding
the correct labels.
Fix: prefer CLAUDE_MODELS[alias].displayName when available, fall back
to SDK's displayName for unknown/future models.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent fa91329 commit 6b51449
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
0 commit comments