Skip to content

fix(providers): update xAI catalog default to grok-4.5#692

Open
lfaoro wants to merge 2 commits into
Gitlawb:mainfrom
lfaoro:fix/update-xai-model-catalog
Open

fix(providers): update xAI catalog default to grok-4.5#692
lfaoro wants to merge 2 commits into
Gitlawb:mainfrom
lfaoro:fix/update-xai-model-catalog

Conversation

@lfaoro

@lfaoro lfaoro commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

  • Updates
    • Added xAI’s Grok 4.5 to the available model list.
    • Set Grok 4.5 as the default xAI model for new sessions and OAuth setup.
    • Kept Grok 4 available, labeled as the previous flagship model.

Add grok-4.5 as the curated xAI default and keep grok-4 as the previous
flagship for offline/fallback model selection.
@coderabbitai

coderabbitai Bot commented Jul 14, 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: CHILL

Plan: Pro

Run ID: f4833eb3-75a3-450f-82da-65046dfd13ed

📥 Commits

Reviewing files that changed from the base of the PR and between 5f08a1f and fe921a4.

📒 Files selected for processing (1)
  • internal/tui/onboarding_test.go

Walkthrough

The xAI provider default changes from grok-4 to grok-4.5. The curated catalog adds grok-4.5, relabels grok-4 as the previous flagship, and updates OAuth onboarding test setup.

Changes

xAI model catalog

Layer / File(s) Summary
Promote grok-4.5 as the default
internal/providercatalog/catalog.go, internal/providermodelcatalog/catalog.go, internal/tui/onboarding_test.go
The provider default, curated model list, and OAuth test configuration now identify grok-4.5 as the catalog default, while grok-4 is labeled the previous flagship.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • Gitlawb/zero#141: Introduces or structures the provider catalog definitions updated by this change.

Suggested reviewers: anandh8x, gnanam1990

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating the xAI catalog default model to grok-4.5.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6fc1220 and 5f08a1f.

📒 Files selected for processing (2)
  • internal/providercatalog/catalog.go
  • internal/providermodelcatalog/catalog.go

Comment thread internal/providercatalog/catalog.go
Align the OAuth setup fixture with the promoted xAI catalog default.

@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.

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 /effort command reports no controls for grok-4.5; users cannot select its documented low, medium, or high reasoning 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 gnanam1990 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.

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),

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.

[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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @gnanam1990 for the review.

grok-4.5 is the live model ID on api.x.ai.
https://docs.x.ai/developers/models

image

@lfaoro lfaoro Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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}'

@Vasanthdev2004 Vasanthdev2004 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.

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.

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.

4 participants