Skip to content

fix(models): correct Grok effort tiers - #3669

Merged
steebchen merged 3 commits into
mainfrom
verify-grok-4-5-reasoning
Aug 18, 2026
Merged

steebchen merged 3 commits into
mainfrom
verify-grok-4-5-reasoning

Conversation

@steebchen

@steebchen steebchen commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Problem

xAI accepts compatibility aliases in addition to each model's distinct reasoning controls. The Grok 4.6 catalogue exposed minimal even though xAI normalizes it to low, while Grok 4.5's intentionally narrower list was undocumented.

Changes

  • expose Grok 4.5's distinct low, medium, and high controls
  • expose Grok 4.6's distinct low, medium, high, and xhigh controls
  • document why minimal, none, and max are not advertised

The existing xAI adapter already forwards reasoning_effort verbatim. Chat and Responses normalization already preserves reasoning text, summaries, reasoning-token usage, and cost details, so no adapter changes are needed.

Verification

Live xAI Chat Completions and native Responses probes verified both deployments:

  • Grok 4.5: minimal normalizes to low; xAI documents xhigh as equivalent to high; none and max reject
  • Grok 4.6: minimal normalizes to low; low, medium, high, and xhigh remain distinct; none and max reject
  • Responses reflect the effective effort and include reasoning summaries
  • Chat Completions return reasoning_content and nested reasoning-token usage
  • usage totals and xAI cost ticks reconcile with catalogue pricing

Commands:

  • focused model, usage, cost, and response-normalization tests: 186 passed
  • TEST_MODELS=xai/grok-4-6 FULL_MODE=true pnpm test:e2e: 105 passed, 94 skipped
  • pnpm format
  • pnpm build

Summary by CodeRabbit

  • Documentation
    • Updated reasoning-level options for Grok models.
    • Clarified that minimal and xhigh are aliases for existing reasoning tiers where applicable.
    • Updated supported options for grok-4-6 to include low, medium, high, and xhigh.

Copilot AI lite review requested due to automatic review settings August 18, 2026 09:46

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 361cf168-8401-419f-a3aa-ebc3dd014f5c

📥 Commits

Reviewing files that changed from the base of the PR and between a0164d0 and 0226b20.

📒 Files selected for processing (1)
  • packages/models/src/models/xai.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/models/src/models/xai.ts

Included review availability: Your plan includes up to 4 reviews per rolling hour; 1 remains after this review.


Walkthrough

The xAI model metadata documents reasoning-effort aliases for grok-4-5 and removes minimal from the exposed tiers for grok-4-6.

Changes

xAI reasoning effort support

Layer / File(s) Summary
Reasoning-effort metadata updates
packages/models/src/models/xai.ts
grok-4-5 documents minimal as low and xhigh as high. grok-4-6 exposes low, medium, high, and xhigh, without minimal.

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

Merge Risk: ⚪ Minimal · up to 0226b

This PR updates Grok reasoning-effort options and forwards the newly supported tiers; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: correcting Grok reasoning effort tiers in the models package.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch verify-grok-4-5-reasoning

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.

@steebchen steebchen changed the title fix(models): expose Grok 4.5 efforts fix(models): correct Grok effort tiers Aug 18, 2026
@steebchen
steebchen enabled auto-merge (squash) August 18, 2026 10:40
@steebchen
steebchen merged commit be790a5 into main Aug 18, 2026
18 checks passed
@steebchen
steebchen deleted the verify-grok-4-5-reasoning branch August 18, 2026 10:43
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.

2 participants