fix(model): preserve [1m] tag for the 'best' alias - #1671
Conversation
parseUserSpecifiedModel appended the [1m] (1M-context) tag for the opus, sonnet, and haiku aliases but not for 'best'. Since 'best' resolves to the same model as 'opus' (getDefaultOpusModel), 'best[1m]' silently dropped the 1M-context request while 'opus[1m]' kept it — so a user pinning 'best[1m]' lost the larger context window. Append the tag for 'best' as well, matching the other aliases. Add a relational regression test (best[1m] tracks opus[1m], tag is case-insensitive and not duplicated).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (5)**/*.{ts,tsx,js,jsx,py}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*⚙️ CodeRabbit configuration file
Files:
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}⚙️ CodeRabbit configuration file
Files:
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}⚙️ CodeRabbit configuration file
Files:
**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughIn Changesbest[1m] alias tag preservation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
jatmn
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I do not see any actionable issues from my review.
@kevincodex1 LGTM
Problem
parseUserSpecifiedModelappends the[1m](1M-context) tag for theopus,sonnet, andhaikualiases, but not forbest:getBestModel()returnsgetDefaultOpusModel()— the same model as theopusalias — so the two should behave identically. They don't:A user pinning
best[1m](best model, 1M context) silently loses the larger context window.Fix
Append the tag for
bestas well, matching the other aliases:Test
Added
parseUserSpecifiedModel.bestTag.test.tswith relational assertions (no hardcoded model id):best[1m]===best+[1m]best/best[1m]trackopus/opus[1m]exactlyVerified it fails before the fix and passes after.
tsc --noEmitclean.Summary by CodeRabbit
Bug Fixes
Tests