Skip to content

feat(xai): add Grok 4.7 support - #155379

Merged
RomneyDa merged 1 commit into
mainfrom
feat/grok-4-7
Sep 22, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
feat/grok-4-7

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

  • add Grok 4.7 to the curated xAI model catalog with its published 500k context window, multimodal input, and token pricing
  • make Grok 4.7 the default for new xAI setups and unconfigured xAI server tools
  • expose low, medium, high, and xhigh reasoning, Responses compatibility, prompt caching, OAuth routing, and live-matrix coverage
  • migrate retired xai/auto selections to Grok 4.7 and refresh provider docs

Validation

  • pnpm test -- extensions/xai (669 tests)
  • pnpm test -- src/commands/doctor-retired-models.ordering.test.ts src/commands/doctor/shared/xai-auto-retirement.test.ts (30 tests)
  • pnpm test -- src/agents/model-compat.test.ts (57 tests)
  • pnpm lint (passes; existing max-lines warning in src/cron/service/timer.test.ts)

References

@clawsweeper

clawsweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations agents Agent runtime and tooling extensions: xai size: S maintainer Maintainer-authored PR labels Sep 22, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 21, 2026, 11:06 PM ET / September 22, 2026, 03:06 UTC.

ClawSweeper review

What this changes

Adds Grok 4.7 to the xAI catalog and reasoning controls, makes it the setup and server-tool default, and updates retired-model replacements, tests, and documentation.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: current main lacks the curated Grok 4.7 capabilities, and the introduced implementation has no identified blocking code defect. Overlapping work exists, but this maintainer-authored PR additionally changes defaults and retirement behavior.

Priority: P2
Reviewed head: 0b393be35ecaa91130e04dfa95d0fc47555efcb0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful preservation coverage and no identified blocking code defect; default-transition validation remains required.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a MEMBER, so the external-contributor proof gate does not apply. Supplied tests cover catalog, payload, setup, and retirement behavior; repository-required live contract and upgrade validation remains outstanding for the changed defaults.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a MEMBER, so the external-contributor proof gate does not apply. Supplied tests cover catalog, payload, setup, and retirement behavior; repository-required live contract and upgrade validation remains outstanding for the changed defaults.
Evidence reviewed 10 items Introduced change and merge ownership: Reviewed the merge-base-to-head delta. The inspected test merge has the pinned base followed by the exact PR head as its raw parents; its result preserves the same bounded xAI change.
Still needed on current main: Current main recognizes Grok 4.6 for xhigh and retains Grok 4.6 as the default; generic forward compatibility does not supply the proposed curated Grok 4.7 metadata and reasoning controls.
Latest supplied release: The v2026.9.5 source also retains the Grok 4.6 default and retirement replacement, with no Grok 4.7 catalog entry.
Findings None None.
Security None None.

How this fits together

The xAI plugin translates model selections and tool requests into xAI Responses API calls. Its catalog supplies model capabilities, setup defaults, and replacement metadata consumed by Doctor.

flowchart TD
  A[User model selection] --> C[xAI catalog and defaults]
  B[Saved retired selections] --> D[Doctor model repair]
  C --> D
  C --> E[Reasoning and transport compatibility]
  F[Search and code tools] --> E
  E --> G[xAI Responses API]
Loading

Before merge

  • Resolve merge risk (P1) - Existing installations without tool-model overrides switch to Grok 4.7, and Doctor rewrites remaining native xai/auto selections to it; fresh-setup and published-version upgrade execution have not established that these changed defaults work while preserving account pins and explicit settings.
  • Complete next step (P2) - Attach live provider and fresh-setup/published-driver upgrade evidence for the new defaults and xai/auto replacement, and record the changed-test timing required by repository policy.
Agent review details

Security

None.

PR surface

Source +19, Tests +31, Docs +2. Total +52 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 7 30 11 +19
Tests 18 76 45 +31
Docs 4 21 19 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 29 127 75 +52

Review metrics

Metric Value Why it matters
Default transition 2 setup methods, 3 server tools, 1 retirement target The shared model change affects both new setups and existing installations with omitted tool settings or retired selections.

Merge-risk options

Maintainer options:

  1. Validate the default transition (recommended)
    Provide fresh-setup and published-driver upgrade results, including working Grok 4.7 requests and preservation of pinned models, accounts, and tool overrides.
  2. Separate capability support from default promotion
    Keep existing defaults and retirement targets for this landing, then advance them in a separately validated change.

Technical review

Best possible solution:

Retain the existing plugin-owned catalog and compatibility design, with live contract and upgrade evidence supporting promotion of Grok 4.7 to shared defaults.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a defect reproduction: this is a model-support addition, and source inspection confirms current main lacks its curated capabilities.

Is this the best way to solve the issue?

Yes for the implementation structure: extending the existing catalog and reasoning owner avoids duplicate machinery; advancing shared defaults additionally needs upgrade validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 91f0839da752.

Labels

Label changes:

  • add P2: This is a bounded provider capability update without evidence of an urgent existing-user outage.
  • add merge-risk: 🚨 compatibility: The patch changes implicit tool defaults and persisted retirement replacements, whose upgrade behavior still needs execution evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a MEMBER, so the external-contributor proof gate does not apply. Supplied tests cover catalog, payload, setup, and retirement behavior; repository-required live contract and upgrade validation remains outstanding for the changed defaults.

Label justifications:

  • P2: This is a bounded provider capability update without evidence of an urgent existing-user outage.
  • merge-risk: 🚨 compatibility: The patch changes implicit tool defaults and persisted retirement replacements, whose upgrade behavior still needs execution evidence.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a MEMBER, so the external-contributor proof gate does not apply. Supplied tests cover catalog, payload, setup, and retirement behavior; repository-required live contract and upgrade validation remains outstanding for the changed defaults.

Evidence

What I checked:

  • Introduced change and merge ownership: Reviewed the merge-base-to-head delta. The inspected test merge has the pinned base followed by the exact PR head as its raw parents; its result preserves the same bounded xAI change. (0b393be35eca)
  • Still needed on current main: Current main recognizes Grok 4.6 for xhigh and retains Grok 4.6 as the default; generic forward compatibility does not supply the proposed curated Grok 4.7 metadata and reasoning controls. (extensions/xai/model-id.ts:2, 91f0839da752)
  • Latest supplied release: The v2026.9.5 source also retains the Grok 4.6 default and retirement replacement, with no Grok 4.7 catalog entry. (extensions/xai/openclaw.plugin.json:52, ec9c1a13db89)
  • Published provider contract: The official Grok 4.7 guide confirms 500,000-token context, text/image input, low through xhigh reasoning, Responses API support, and search/code tools. This supports the capability additions but is not execution evidence for this branch.
  • Explicit settings remain authoritative: Setup and request tests cover retained primary models, ordered fallbacks, authored settings, and explicit tool-model overrides. The shared default nevertheless changes all three server tools when their model setting is absent. (extensions/xai/catalog-defaults.test.ts:53, 0b393be35eca)
  • Retirement upgrade boundary: The manifest changes the native API and subscription-route auto replacement to Grok 4.7. Updated fixtures retain account pins, settings, custom endpoints, and disallowed-successor handling; no published-driver upgrade execution is supplied. (extensions/xai/openclaw.plugin.json:126, 0b393be35eca)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • kiranmagic7: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record live Grok 4.7 request results and fresh-setup/published-driver upgrade evidence for the default transition, with private details redacted.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@RomneyDa
RomneyDa merged commit 2a2d28d into main Sep 22, 2026
150 checks passed
@RomneyDa
RomneyDa deleted the feat/grok-4-7 branch September 22, 2026 03:27
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: xai maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant