fix(providers): update xAI catalog default to grok-4.5#692
Conversation
Add grok-4.5 as the curated xAI default and keep grok-4 as the previous flagship for offline/fallback model selection.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe xAI provider default changes from ChangesxAI model catalog
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@internal/providercatalog/catalog.go`:
- Line 142: Update the onboarding test fixture in the relevant test setup to use
DefaultModel "grok-4.5" instead of "grok-4", and adjust its related assertions
to expect the promoted default while preserving the existing onboarding
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c8580d98-346e-4e70-8d0e-92f8767b825d
📒 Files selected for processing (2)
internal/providercatalog/catalog.gointernal/providermodelcatalog/catalog.go
Align the OAuth setup fixture with the promoted xAI catalog default.
jatmn
left a comment
There was a problem hiding this comment.
I found issues that need to be addressed before this is ready.
Findings
- [P2] Register Grok 4.5's reasoning capability with the promoted default
internal/providermodelcatalog/catalog.go:146
The new default is only a bare curated model row. Because it has no model-registry entry and the unknown-model fallback has no Grok rule, the TUI's/effortcommand reports no controls forgrok-4.5; users cannot select its documentedlow,medium, orhighreasoning levels and are stuck with the provider default (high). Add its supported reasoning metadata (and regression coverage) to the capability path when promoting it as the default.
gnanam1990
left a comment
There was a problem hiding this comment.
Local review (not a blocker): built and ran touched-package tests locally; all pass. One verification ask before merge.
| transportDescriptor("bedrock", "Amazon Bedrock", TransportBedrock, "https://bedrock-runtime.${AWS_REGION}.amazonaws.com", "anthropic.claude-3-5-sonnet-20241022-v2:0", []string{"AWS_ACCESS_KEY_ID", "AWS_PROFILE"}, []APIFormat{APIFormatBedrockConverse}, true), | ||
| transportDescriptor("vertex", "Vertex AI", TransportVertex, "https://aiplatform.googleapis.com", "gemini-2.5-pro", []string{"GOOGLE_APPLICATION_CREDENTIALS"}, []APIFormat{APIFormatVertexGenerateContent}, true), | ||
| oauthProvider(openAICompat("xai", "xAI", "https://api.x.ai/v1", "grok-4", []string{"XAI_API_KEY"}), false, true), | ||
| oauthProvider(openAICompat("xai", "xAI", "https://api.x.ai/v1", "grok-4.5", []string{"XAI_API_KEY"}), false, true), |
There was a problem hiding this comment.
[P2] Confirm grok-4.5 is a live model ID on api.x.ai before merging
This flips the xAI default from grok-4 to grok-4.5 (also in internal/providermodelcatalog/catalog.go). If grok-4.5 is not served by api.x.ai (or the ID differs, e.g. grok-4-5), every default xAI request 404s on first use. grok-4 is retained as "previous flagship" so a revert is trivial. Could not verify without API access.
There was a problem hiding this comment.
Thanks @gnanam1990 for the review.
grok-4.5 is the live model ID on api.x.ai.
https://docs.x.ai/developers/models
There was a problem hiding this comment.
xAI /models endpoint is gated by token/credits but you can see the model ID via openrouter open endpoint.
curl -s https://openrouter.ai/api/v1/models \
| jq '.data[] | select(.id | startswith("x-ai")) | {id, name}'There was a problem hiding this comment.
Looks good bumping the xAI default to grok-4.5 across the provider descriptor, the curated model list (grok-4 retained as "previous flagship"), and the onboarding test fixture. grok-4.5 is the real publicly released xAI model (announced July 8, 2026, id grok-4.5), build/vet/gofmt are clean on the touched packages, and the providercatalog, providermodelcatalog, and xAI/onboarding tui tests pass. No attribution-header or trust-anchor concerns on this one. Approving.
Add grok-4.5 as the curated xAI default and keep grok-4 as the previous flagship for offline/fallback model selection.
Summary by CodeRabbit