fix(typecheck): add missing xai entry to deprecation retirement date maps#1509
Conversation
…maps The LegacyAPIProvider union type includes 'xai' but the three DEPRECATED_MODELS entries were missing the corresponding key, causing TS2741 'Property xai is missing' errors. Refs: Gitlawb#1486
|
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 (1)
📜 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). (1)
🧰 Additional context used📓 Path-based instructions (2)**/*⚙️ CodeRabbit configuration file
Files:
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThree deprecated model entries in the deprecation registry now include an explicit ChangesDeprecation model provider mappings
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
🚥 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.
…maps (Gitlawb#1509) The LegacyAPIProvider union type includes 'xai' but the three DEPRECATED_MODELS entries were missing the corresponding key, causing TS2741 'Property xai is missing' errors. Refs: Gitlawb#1486
Summary
Refs #1486.
The
LegacyAPIProvidertype union includes'xai'but the threeDEPRECATED_MODELSretirement date entries were missing thexaikey, causing TS2741 "Property xai is missing" errors.What changed
xai: nullto each of the threeretirementDatesobjects inDEPRECATED_MODELS(claude-3-opus, claude-3-7-sonnet, claude-3-5-haiku).Why
The
Record<LegacyAPIProvider, string | null>type requires every key in the union to be present. Whenxaiwas added toLegacyAPIProvider(inproviders.ts), the deprecation maps were not updated. This is a type-completeness fix with zero runtime behavior change — previouslygetDeprecatedModelInfo()would returnundefined(treated as "not deprecated") forxai; now it returnsnull(also "not deprecated").perplexityis intentionally not added because it is not yet in theLegacyAPIProviderunion. It should be added in the PR that introduces perplexity as a provider.Validation
git diff --check— passedbun run typecheck— zero errors indeprecation.ts(was 3 × TS2741)LegacyAPIProviderkeys present in everyretirementDatesentrySummary by CodeRabbit