Skip to content

fix(xai): expose Grok 4.6 xhigh reasoning - #1593

Merged
lidge-jun merged 3 commits into
lidge-jun:devfrom
olddonkey:codex/grok-46-xhigh-reasoning
Aug 13, 2026
Merged

fix(xai): expose Grok 4.6 xhigh reasoning#1593
lidge-jun merged 3 commits into
lidge-jun:devfrom
olddonkey:codex/grok-46-xhigh-reasoning

Conversation

@olddonkey

@olddonkey olddonkey commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Advertise xAI's documented low / medium / high / xhigh ladder for grok-4.6; keep grok-4.5 on low / medium / high.
  • Preserve xAI's documented high default in the generated Codex catalog.
  • Let the ordinary ladder clamp translate Codex max / ultra to Grok 4.6 xhigh; no provider alias map is needed.
  • Refresh existing xAI OAuth presets through the existing registry reconciliation path. Runtime fills the high default while preserving an explicit user default.
  • Preserve explicit API-key ladders and provider-wide downgrade maps instead of forcing xhigh into user-owned configuration.
  • Keep Cursor's Grok 4.6 suffixes at low / medium / high until Cursor live discovery exposes an xhigh wire ID.
  • Synchronize the Codex App model guide in English, Korean, Russian, Simplified Chinese, and Traditional Chinese.

Official contract: https://docs.x.ai/developers/model-capabilities/text/reasoning

Fixes #1592

Review follow-up

The follow-up review correctly identified that the earlier { max: "xhigh" } registry map abused stale-ladder healing and could override an operator's intentional narrower ladder or provider-wide downgrade map. That map has been removed and regression coverage now pins the override behavior.

The reported routing/catalog/CLI inconsistencies depended on that removed healing behavior. With no synthetic model map, an explicit three-level API-key ladder remains three-level consistently across those surfaces. The OAuth preset path is refreshed by its existing authoritative reconciliation.

The OAuth subscription proxy does not publish a separate reasoning-effort contract. This PR follows xAI's public Grok 4.6 contract but does not add speculative 400 retry/downgrade behavior without a reproducible proxy rejection.

Verification

  • bun test tests/reasoning-effort.test.ts tests/provider-registry-parity.test.ts tests/effort-policy.test.ts tests/catalog-vision-sidecar-modalities.test.ts tests/xai-transport.test.ts tests/oauth-provider-reconcile.test.ts tests/routing-profile.test.ts tests/policy-execution.test.ts tests/route-explainability.test.ts — 217 passed, 0 failed
  • bun run test — exercised the full 716-file suite in 556.58s: 11,483 passed and 8 skipped; the sole failure was the unrelated timing-sensitive CL-07 inactivity test under full-suite load.
  • bun test --isolate tests/lab-fabric-task.test.ts -t 'inactivity timeout is bounded for trusted route executors' — passed in 3 consecutive retries (773.66ms, 763.03ms, 768.19ms).
  • bun run typecheck — passed
  • bun run privacy:scan — passed
  • git diff --check upstream/dev...HEAD — passed
  • Rebased onto the latest upstream/dev before the final focused run.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • User-facing documentation is synchronized.
  • Security-sensitive changes were reviewed. (Capability metadata and tests only; no credential or auth-flow changes.)

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Added xAI Grok 4.6 to the available model catalog, including image input support.
    • Added support for reasoning levels from low through xhigh, with high as the default.
    • Added support for Grok 4.6’s 500,000-token context window.
    • Added advanced reasoning mappings through max and ultra where applicable.
  • Documentation

    • Updated model availability and capability guides across supported languages to include Grok 4.6 and its reasoning options.
  • Bug Fixes

    • Improved preservation of configured reasoning preferences during model reconciliation.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently. If no CodeRabbit review appears, comment @coderabbitai review to request one.
Maintainers: @lidge-jun @Ingwannu @Wibias

@github-actions
github-actions Bot marked this pull request as draft August 13, 2026 06:29
@coderabbitai

coderabbitai Bot commented Aug 13, 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 75026ebd-f10a-4937-875f-e549a99bce2e

📥 Commits

Reviewing files that changed from the base of the PR and between 5bdbbf0 and f813db1.

📒 Files selected for processing (9)
  • docs-site/src/content/docs/guides/codex-app-models.md
  • docs-site/src/content/docs/ko/guides/codex-app-models.md
  • docs-site/src/content/docs/ru/guides/codex-app-models.md
  • docs-site/src/content/docs/zh-cn/guides/codex-app-models.md
  • docs-site/src/content/docs/zh-tw/guides/codex-app-models.md
  • src/providers/registry.ts
  • tests/oauth-provider-reconcile.test.ts
  • tests/provider-registry-parity.test.ts
  • tests/reasoning-effort.test.ts

📝 Walkthrough

Walkthrough

The xAI registry now advertises xhigh for grok-4.6 while retaining the existing Grok 4.5 ladder. Tests cover modality metadata, provider parity, catalog expansion, reconciliation, and reasoning-effort forwarding and clamping.

Changes

Grok 4.6 reasoning and catalog support

Layer / File(s) Summary
Registry reasoning metadata
src/providers/registry.ts
Grok 4.6 metadata documents matching context and vision capabilities, plus the low, medium, high, and xhigh reasoning ladder. Grok 4.5 remains limited to low, medium, and high.
Routing and provider reconciliation
tests/reasoning-effort.test.ts, tests/oauth-provider-reconcile.test.ts
Tests verify xhigh forwarding for Grok 4.6, max mapping to xhigh, Grok 4.5 clamping, explicit ladder overrides, runtime defaults, and idempotent reconciliation.
Catalog validation and documentation
tests/catalog-vision-sidecar-modalities.test.ts, tests/effort-policy.test.ts, tests/provider-registry-parity.test.ts, docs-site/src/content/docs/guides/codex-app-models.md, docs-site/src/content/docs/{ko,ru,zh-cn,zh-tw}/guides/codex-app-models.md
Tests and documentation add Grok 4.6 image support, 500,000-token context metadata, high defaults, reasoning levels through xhigh, and Grok 4.5 fallback behavior.

Estimated code review effort: 2 (Simple) | ~15 minutes

Mergeability Score: ⚪ Minimal · up to f813d

This localized change exposes the documented Grok 4.6 reasoning ladder while preserving existing configuration behavior and updating related documentation and tests; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun, wibias

🚥 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 identifies the primary change: exposing xAI Grok 4.6 xhigh reasoning.
Linked Issues check ✅ Passed The registry, routing, catalog, forwarding, reconciliation, tests, and documentation changes satisfy issue #1592.
Out of Scope Changes check ✅ Passed All changes support Grok 4.6 reasoning metadata, compatibility behavior, regression coverage, or synchronized documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

@olddonkey olddonkey changed the title fix(xai): advertise grok-4.6 xhigh instead of clamping it to high fix(xai): support Grok 4.6 xhigh reasoning end to end Aug 13, 2026
@olddonkey
olddonkey marked this pull request as ready for review August 13, 2026 07:22
@github-actions
github-actions Bot marked this pull request as draft August 13, 2026 07:22
The Grok 4.6 seed still used the 4.5 low/medium/high ladder, so Codex
xhigh requests never left the proxy. Keep 4.5 unchanged and send the
documented xhigh rung on 4.6.

Closes lidge-jun#1592
@olddonkey
olddonkey force-pushed the codex/grok-46-xhigh-reasoning branch from 683f5f6 to dcb3b6b Compare August 13, 2026 08:15
@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 13, 2026
@olddonkey
olddonkey force-pushed the codex/grok-46-xhigh-reasoning branch from dcb3b6b to f813db1 Compare August 13, 2026 08:17
@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 13, 2026
@olddonkey olddonkey changed the title fix(xai): support Grok 4.6 xhigh reasoning end to end fix(xai): expose Grok 4.6 xhigh reasoning Aug 13, 2026
@github-actions
github-actions Bot marked this pull request as ready for review August 13, 2026 08:31
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Acknowledged. PR #1593 is marked ready for review at head SHA f813db1090c4fb5af785711ad1ad94156ef289d2.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Acknowledged. Pull request #1593 remains ready for review at head SHA f813db1090c4fb5af785711ad1ad94156ef289d2. The readiness checklist is complete.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Acknowledged. Pull request #1593 is ready for review at head SHA f813db1090c4fb5af785711ad1ad94156ef289d2. The review readiness checklist is complete.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@lidge-jun
lidge-jun merged commit 2f3221d into lidge-jun:dev Aug 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants