Skip to content

fix(typecheck): add missing xai entry to deprecation retirement date maps#1509

Merged
kevincodex1 merged 1 commit into
Gitlawb:mainfrom
chioarub:pr-deprecation
Jun 8, 2026
Merged

fix(typecheck): add missing xai entry to deprecation retirement date maps#1509
kevincodex1 merged 1 commit into
Gitlawb:mainfrom
chioarub:pr-deprecation

Conversation

@chioarub

@chioarub chioarub commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Refs #1486.

The LegacyAPIProvider type union includes 'xai' but the three DEPRECATED_MODELS retirement date entries were missing the xai key, causing TS2741 "Property xai is missing" errors.

What changed

  • Added xai: null to each of the three retirementDates objects in DEPRECATED_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. When xai was added to LegacyAPIProvider (in providers.ts), the deprecation maps were not updated. This is a type-completeness fix with zero runtime behavior change — previously getDeprecatedModelInfo() would return undefined (treated as "not deprecated") for xai; now it returns null (also "not deprecated").

perplexity is intentionally not added because it is not yet in the LegacyAPIProvider union. It should be added in the PR that introduces perplexity as a provider.

Validation

  • git diff --check — passed
  • bun run typecheck — zero errors in deprecation.ts (was 3 × TS2741)
  • All 13 LegacyAPIProvider keys present in every retirementDates entry

Summary by CodeRabbit

  • Chores
    • Updated model deprecation metadata to ensure consistent provider configuration tracking across all entries.

…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
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 327afc09-cc6a-4784-876e-8a308b462f87

📥 Commits

Reviewing files that changed from the base of the PR and between 343cd1a and 89b5591.

📒 Files selected for processing (1)
  • src/utils/model/deprecation.ts
📜 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)
  • GitHub Check: smoke-and-tests
🧰 Additional context used
📓 Path-based instructions (2)
**/*

⚙️ CodeRabbit configuration file

**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.

Files:

  • src/utils/model/deprecation.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}

⚙️ CodeRabbit configuration file

{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.

Files:

  • src/utils/model/deprecation.ts
🔇 Additional comments (1)
src/utils/model/deprecation.ts (1)

49-49: LGTM!

Also applies to: 67-67, 85-85


📝 Walkthrough

Walkthrough

Three deprecated model entries in the deprecation registry now include an explicit xai: null provider entry in their retirement dates mappings. This change applies the same pattern consistently across claude-3-opus, claude-3-7-sonnet, and claude-3-5-haiku model definitions.

Changes

Deprecation model provider mappings

Layer / File(s) Summary
Add xai provider to deprecated models
src/utils/model/deprecation.ts
The retirementDates mapping for claude-3-opus, claude-3-7-sonnet, and claude-3-5-haiku now explicitly includes xai: null entries for consistent provider coverage.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • jatmn
  • kevincodex1
🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the change: adding the missing xai entry to deprecation retirement date maps to fix typecheck errors.
Description check ✅ Passed The description covers all required sections with clear detail: summary with issue reference, what changed, why it changed, and validation results. Testing checkboxes are noted as pending.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Risk Surface Disclosed ✅ Passed PR only touches deprecation metadata for warnings; no auth, routing, permissions, network, execution, config, plugins, CI, or release script changes present.
No Hidden Policy Change ✅ Passed PR adds only xai: null entries to 3 deprecated model definitions for type completeness; no policy, routing, trust-model, telemetry/network, or permission changes present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I do not see any actionable issues from my review.

@kevincodex1

@kevincodex1 kevincodex1 merged commit 1d90960 into Gitlawb:main Jun 8, 2026
3 checks passed
@chioarub chioarub deleted the pr-deprecation branch June 8, 2026 23:01
deagwon97 pushed a commit to deagwon97/openclaude that referenced this pull request Jun 11, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants