Repository navigation
chore(xai): deactivate retired Grok models on 2026-05-15 - #2172
Conversation
Per xAI's retirement notice, the following models are retired from the xAI API effective 2026-05-15: grok-3, grok-4-0709, grok-code-fast-1, grok-4-fast-reasoning, grok-4-fast-non-reasoning, grok-4-1-fast-reasoning, grok-4-1-fast-non-reasoning, grok-imagine-image-pro. The unified grok-4-fast and grok-4-1-fast routes are also marked deactivated on the xAI side; azure-ai-foundry providers remain active. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WalkthroughDeactivation timestamps are added to multiple XAI model provider entries in the models configuration, primarily setting ChangesModel Deactivation Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/models/src/models/xai.ts (1)
479-556:grok-4-fastwill have zero active providers post-deactivation — confirm graceful error handling.Unlike
grok-4-1-fast, thegrok-4-fastrouter has noazure-ai-foundryfallback. After May 15, all its providers are deactivated, so any request to this model ID will result in no routable provider. Verify that the gateway surfaces a clean user-facing error (e.g., "model unavailable" or "no active provider") rather than an internal routing failure for this and other single-provider models (grok-3,grok-4-fast-reasoning,grok-4-fast-non-reasoning) in the same situation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/models/src/models/xai.ts` around lines 479 - 556, grok-4-fast currently lists only deactivated providers ("grok-4-fast-non-reasoning", "grok-4-fast-reasoning") so after 2026-05-15 requests will find no active provider; update the routing/gateway resolver that selects a provider for a model ID (the code that inspects providers for a model like "grok-4-fast") to detect the zero-active-provider case and return a clear user-facing error (e.g., "model unavailable" / "no active provider") or route to an explicit fallback if desired; ensure the change handles other single-provider models (e.g., "grok-3", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning") and that the error is surfaced as a user-level response rather than an internal routing exception.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/models/src/models/xai.ts`:
- Around line 479-556: grok-4-fast currently lists only deactivated providers
("grok-4-fast-non-reasoning", "grok-4-fast-reasoning") so after 2026-05-15
requests will find no active provider; update the routing/gateway resolver that
selects a provider for a model ID (the code that inspects providers for a model
like "grok-4-fast") to detect the zero-active-provider case and return a clear
user-facing error (e.g., "model unavailable" / "no active provider") or route to
an explicit fallback if desired; ensure the change handles other single-provider
models (e.g., "grok-3", "grok-4-fast-reasoning", "grok-4-fast-non-reasoning")
and that the error is surfaced as a user-level response rather than an internal
routing exception.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2ed32de8-6e4b-46d8-ac1f-98b07099c902
📒 Files selected for processing (1)
packages/models/src/models/xai.ts
Summary
xaiprovider entry withdeactivatedAt: 2026-05-15so the gateway stops routing to them at the cutoff.grok-3,grok-4-0709,grok-code-fast-1,grok-4-fast-reasoning,grok-4-fast-non-reasoning,grok-4-1-fast-reasoning,grok-4-1-fast-non-reasoning,grok-imagine-image-pro.grok-4-fastandgrok-4-1-fastroute entries also have their xAI providers (both reasoning and non-reasoning variants) marked deactivated.azure-ai-foundryproviders forgrok-4-1-fast-reasoning/grok-4-1-fast-non-reasoningare unaffected and remain active.Note on Veo: the screenshot references Veo 2 / Veo 3 retirement on 2026-06-30. The gateway only ships Veo 3.1 entries, and PR #2082 already migrated the Vertex
modelNameto the GA-001IDs, so no changes are needed here.Test plan
grok-4-1-fast-reasoning/grok-4-1-fast-non-reasoningstill resolve viaazure-ai-foundryafter the cutoffgrok-4,grok-4.3,grok-3-mini, etc.) continue to route normally🤖 Generated with Claude Code
Summary by CodeRabbit