Skip to content

fix(xai): Grok subscription inference fails with HTTP 426 on every request - #113663

Closed
jzakirov wants to merge 2 commits into
openclaw:mainfrom
jzakirov:fix/xai-grok-oauth-client-version
Closed

jzakirov wants to merge 2 commits into
openclaw:mainfrom
jzakirov:fix/xai-grok-oauth-client-version

Conversation

@jzakirov

@jzakirov jzakirov commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #113662

What Problem This Solves

Fixes an issue where users signed in to xAI with the Grok subscription (OAuth) could not run a single agent turn: every inference request returned HTTP 426 and the model never replied.

The failure is silent up to the first turn. Provider setup, models list, and model discovery all succeed, because xAI gates only the inference endpoint. Users see a healthy, fully configured xAI provider and then an opaque 426 on their first message.

Reproduced live against https://cli-chat-proxy.grok.com/v1/responses with a valid xAI OAuth bearer token:

POST /v1/responses
Authorization: Bearer <valid xAI OAuth token>

HTTP/1.1 426
{"error":"Your Grok CLI version (none) is outdated. Please update to version 0.1.202 or later via `grok update` or the installation documentation."}

(none) is the literal client version the proxy read off the request. OpenClaw sends no client-version header on this route at all.

Why This Change Was Made

extensions/xai/provider-catalog.ts builds the Grok OAuth provider (buildLiveXaiOAuthProvider, buildXaiOAuthFallbackProvider) with baseUrl / api / auth / models and no headers. The only place the xAI plugin adds client identity is xaiUserAgentHeaderFor() in extensions/xai/src/xai-user-agent.ts, which deliberately returns {} for every host outside XAI_NATIVE_API_HOSTS = new Set(["api.x.ai"]) and is only wired into tts.ts, realtime-voice-bridge.ts, and realtime-transcription-provider.ts — never the text-inference path. So the OAuth proxy receives nothing.

The fix attaches x-grok-client-version as a provider-level static header on the two Grok OAuth provider configs only, next to XAI_GROK_OAUTH_BASE_URL. Design notes:

  • Scoped to the OAuth proxy, not to xaiUserAgentHeaderFor. Extending the api.x.ai host allowlist there would not fix the bug (that helper is not on the inference path) and would blur its stated purpose of withholding OpenClaw identity from user-configured proxies. Putting the header on the provider config that owns cli-chat-proxy.grok.com keeps the scope exact: the API-key route (https://api.x.ai/v1) is untouched and stays header-free, which the tests assert.
  • Provider-level headers is the existing seam, and it reaches the wire. MODEL_PROVIDER_CONFIG_KEYS in src/plugins/provider-catalog-result.ts retains headers when projecting a plugin catalog result into provider config; buildInlineProviderModels (src/agents/embedded-agent-runner/model.inline-provider.ts) folds them through resolveProviderRequestConfig into each runtime model, and ModelRegistry.getApiKeyAndHeaders (src/agents/sessions/model-registry.ts) merges them into the outbound request. extensions/kimi-coding/provider-catalog.ts already uses exactly this seam to satisfy a vendor-gated endpoint.
  • The version is pinned to a named constant with the rationale inline. 0.1.202 is the minimum xAI's proxy currently names in its own 426 body. It is a compatibility floor from an external service, so it needs a comment and a single place to bump, not a scattered literal.
  • Both OAuth builders get it, without duplicating the constant. buildXaiOAuthFallbackProvider() is the path taken when live discovery fails, and it still routes inference to the same gated proxy, so omitting the header there would leave a live 426 path behind. buildLiveXaiOAuthProvider() now destructures that fallback (const { models, ...providerConfig }) instead of picking baseUrl/api/auth, which is the same shape buildOpenAICompatibleLiveModelProviderConfig uses. The live path therefore cannot silently drop a provider-level setting the fallback declares.
  • The header is gated on the effective base URL. Provider-level headers survive an operator's models.providers.xai.baseUrl override, because mergeImplicitProviderConfig (src/agents/models-config.providers.implicit.ts:271) merges as { ...implicit, ...existing } and xai has no entry in PROVIDER_IMPLICIT_MERGERS: the operator's baseUrl wins while the catalog's headers survive. The catalog now reads that override from ctx.config and withholds the header whenever the effective route is not https://cli-chat-proxy.grok.com/v1, so a custom proxy never receives vendor identity it did not ask for. Tests cover the override, the canonical-pin case, and the untouched API-key route.

Non-goal: this does not add a config option. The value is dictated by xAI, not by the operator, and AGENTS.md sets a high bar for new config surface.

Accepted tradeoff: if an operator overrides models.providers.xai.baseUrl while on the OAuth route, this constant version string follows to that base URL. It carries no identity or secret — it is a Grok CLI compatibility token — and adding a second host allowlist to guard a version literal would cost more surface than it protects.

User Impact

xAI OAuth / Grok subscription users can actually use the provider. Before this change, every inference request on that route failed with HTTP 426 and the only workaround was switching to a paid API key, which defeats the purpose of the subscription path. API-key users on api.x.ai are unaffected — no new header is sent there.

Evidence

Live HTTP proof (valid xAI OAuth bearer token, redacted; POST https://cli-chat-proxy.grok.com/v1/responses):

Header sent Result
x-grok-client-version: 0.1.202 200, streaming response works
(none) 426, Your Grok CLI version (none) is outdated...
User-Agent: grok-cli/0.1.202 426, version (none)
x-grok-cli-version: 0.1.202 426, version (none)
x-client-version: 0.1.202 426, version (none)
x-app-version: 0.1.202 426, version (none)
grok-cli-version: 0.1.202 426, version (none)
x-grok-version: 0.1.202 426, version (none)
x-cli-version: 0.1.202 426, version (none)
grok-version: 0.1.202 426, version (none)
x-grok-cli: 0.1.202 426, version (none)

Verbatim 426 body:

{"error":"Your Grok CLI version (none) is outdated. Please update to version 0.1.202 or later via `grok update` or the installation documentation."}

x-grok-client-version is the only name the proxy reads; every other candidate still reports version (none).

/v1/models is not gated. GET https://cli-chat-proxy.grok.com/v1/models succeeds without the header on the same token. That is why discovery, catalog, and setup all look healthy while inference is dead — and why this bug does not surface until the user's first message.

Local validation (Ubuntu 24.04.3, Node 24.16.0, source checkout at main):

node scripts/run-vitest.mjs extensions/xai/provider-catalog.test.ts
  Test Files  1 passed (1) | Tests  3 passed (3)

node scripts/run-vitest.mjs extensions/xai
  Test Files  26 passed (26) | Tests  355 passed (355)

pnpm tsgo:extensions          exit 0
pnpm tsgo:extensions:test     exit 0
node scripts/run-oxlint.mjs extensions/xai/provider-catalog.ts extensions/xai/provider-catalog.test.ts
                              exit 0, no findings
pnpm format (oxfmt --check)   All matched files use the correct format.

New tests in extensions/xai/provider-catalog.test.ts cover the live-discovery OAuth provider, the discovery-failure fallback provider, and a negative assertion that the API-key api.x.ai route still carries no Grok CLI header. They drive buildLiveXaiOAuthProvider through its injected fetchGuard, so no network or module-barrel mocking is involved.

Proof gaps, stated plainly:

  • I could not re-run the 426 repro from this PR-prep checkout, because the version gate sits behind authentication: an unauthenticated request to the same endpoint returns 401 Invalid or expired credentials for every header variant, with or without x-grok-client-version. The 426 evidence above comes from a run with a valid OAuth token. The endpoint's reachability and the auth-before-version-check ordering are reproducible without credentials.
  • No end-to-end agent-turn run against a live Grok subscription is included, for the same credential reason. The unit tests assert the header is present on the provider config; the header-to-request path is established by reading src/plugins/provider-catalog-result.ts, src/agents/embedded-agent-runner/model.inline-provider.ts, and src/agents/sessions/model-registry.ts, and by the shipped precedent in extensions/kimi-coding/provider-catalog.ts.

@jzakirov
jzakirov marked this pull request as ready for review July 25, 2026 12:51
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P1 High-priority user-facing bug, regression, or broken workflow. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 4:13 PM ET / 20:13 UTC.

ClawSweeper review

What this changes

The PR adds a static Grok client-version header to the xAI OAuth provider configuration, scopes it away from custom base URLs, and adds provider-catalog coverage.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 8 items remain

Keep this PR open: current main still omits the required OAuth-proxy header, so the central xAI subscription inference failure remains unresolved. The branch is now conflicted with newer OAuth default-model selection code and needs a rebase that composes both behaviors, plus a redacted successful OpenClaw OAuth turn from the final head before merge.

Priority: P1
Reviewed head: 98cc441f8a048972874bf6ea49095c13b6d51b1f

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The intended repair is well-scoped and the proxy evidence is useful, but the conflicted stale implementation has a P1 compatibility gap and lacks final OpenClaw behavior proof.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The PR body shows redacted live proxy output proving the header contract, but it lacks redacted output from a successful OpenClaw OAuth inference turn on the final rebased head; add that evidence without tokens, private endpoints, or other private data. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR body shows redacted live proxy output proving the header contract, but it lacks redacted output from a successful OpenClaw OAuth inference turn on the final rebased head; add that evidence without tokens, private endpoints, or other private data. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current-main behavior: Current main builds the OAuth provider from the fallback's base URL, API, auth mode, and models, but it declares no provider-level headers; the reported proxy requirement is therefore not implemented on main.
Current-main regression-sensitive logic: Current main concurrently fetches the provider's preferred OAuth model and then prepends the generated auto model. The PR-head builder replaces this flow with a single catalog call, so its conflict resolution must preserve the current Promise.all and auto-model composition.
PR implementation site: The PR-head destructures its older fallback and passes it directly to model discovery, carrying the new header but not the newer default-model selection flow present on current main.
Findings 1 actionable finding [P1] Preserve current OAuth default-model selection
Security None None.

How this fits together

The bundled xAI provider resolves OAuth credentials, discovers available Grok models, and projects a provider configuration into the agent model registry. That registry combines provider headers with credentials before requests reach the Grok OAuth proxy for an agent turn.

flowchart LR
  A[xAI OAuth credential] --> B[xAI provider catalog]
  B --> C[Model discovery and default selection]
  C --> D[Provider configuration]
  D --> E[Model registry request headers]
  E --> F[Grok OAuth inference proxy]
  F --> G[Agent response]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR body shows redacted live proxy output proving the header contract, but it lacks redacted output from a successful OpenClaw OAuth inference turn on the final rebased head; add that evidence without tokens, private endpoints, or other private data. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve current OAuth default-model selection (P1) - Rebase this builder onto current main instead of replacing it: current main fetches the OAuth settings default in parallel and calls withXaiOAuthAutoModel. The PR-head implementation removes that composition, so a conflict resolution favoring this version would change the selected default model for subscription users. This remains the prior blocking finding.
  • Resolve merge risk (P1) - The head is marked dirty against main; resolving the conflict by retaining the PR's older builder would remove current OAuth default-model selection and change which model subscription users receive.
  • Resolve merge risk (P1) - The PR's live proxy table proves the external header contract, but it does not show the final rebased OpenClaw OAuth path emitting a successful inference response.
  • Complete next step (P2) - A focused repair can mechanically rebase the header change onto the current OAuth catalog, but contributor-owned live OAuth proof remains required before merge.
  • Improve patch quality - Rebase the catalog implementation while retaining current settings-derived OAuth auto-model selection.
  • Improve patch quality - Add focused coverage that verifies the client header and current default-model selection coexist.
  • Improve patch quality - Post redacted terminal or runtime output from a successful OpenClaw OAuth inference turn on the rebased head.

Findings

  • [P1] Preserve current OAuth default-model selection — extensions/xai/provider-catalog.ts:206
Agent review details

Security

None.

PR surface

Source +31, Tests +76. Total +107 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 40 9 +31
Tests 1 76 0 +76
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 116 9 +107

Review metrics

Metric Value Why it matters
OAuth request contract 1 static provider header added The header changes a vendor-gated inference contract for every xAI OAuth request, so it must compose with existing OAuth catalog behavior before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #113662
Summary: This PR is the candidate implementation for the closed report about the OAuth proxy's missing client-version header; the separate xAI OAuth fallback report concerns a distinct credential-routing failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Rebase and compose the OAuth paths (recommended)
    Preserve current preferred-model discovery and auto-model selection while adding the client-version header to the fallback and live OAuth provider configuration.
  2. Pause the PR
    Do not merge the conflicted branch if the required OAuth account proof or a safe composition with current model-selection behavior cannot be supplied.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Rebase on current main; preserve the OAuth settings/default-model Promise.all flow and auto-model composition, add the client-version header through the current provider configuration, cover both behaviors, then attach redacted successful OpenClaw OAuth inference proof.

Technical review

Best possible solution:

Rebase the header change onto current xAI OAuth catalog logic, retain settings-derived auto-model selection, cover the composed result, and attach redacted output from a successful OpenClaw OAuth inference turn.

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

No complete final-head OpenClaw reproduction is attached. The current source clearly omits the OAuth proxy header and the PR supplies redacted live proxy evidence, so the defect is source-reproducible with high confidence.

Is this the best way to solve the issue?

No: provider-level headers remain the correct delivery seam, but this branch is not the best merge-ready form because it predates current OAuth default-model selection and must compose with it rather than replace it.

Full review comments:

  • [P1] Preserve current OAuth default-model selection — extensions/xai/provider-catalog.ts:206
    Rebase this builder onto current main instead of replacing it: current main fetches the OAuth settings default in parallel and calls withXaiOAuthAutoModel. The PR-head implementation removes that composition, so a conflict resolution favoring this version would change the selected default model for subscription users. This remains the prior blocking finding.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a26df7153f81.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The stale builder conflicts with current OAuth default-model selection, and an incorrect rebase could silently alter existing subscription users' model choice.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P1: The reported path blocks every inference turn for users authenticated through the xAI Grok subscription OAuth route.
  • merge-risk: 🚨 compatibility: The stale builder conflicts with current OAuth default-model selection, and an incorrect rebase could silently alter existing subscription users' model choice.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Needs stronger real behavior proof before merge: The PR body shows redacted live proxy output proving the header contract, but it lacks redacted output from a successful OpenClaw OAuth inference turn on the final rebased head; add that evidence without tokens, private endpoints, or other private data. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs extensions/xai/provider-catalog.test.ts.
  • [P1] node scripts/run-vitest.mjs extensions/xai.
  • [P1] pnpm tsgo:extensions.
  • [P1] Redacted successful OpenClaw OAuth inference transcript or runtime log from the final rebased head.

What I checked:

  • Current-main behavior: Current main builds the OAuth provider from the fallback's base URL, API, auth mode, and models, but it declares no provider-level headers; the reported proxy requirement is therefore not implemented on main. (extensions/xai/provider-catalog.ts:48, a26df7153f81)
  • Current-main regression-sensitive logic: Current main concurrently fetches the provider's preferred OAuth model and then prepends the generated auto model. The PR-head builder replaces this flow with a single catalog call, so its conflict resolution must preserve the current Promise.all and auto-model composition. (extensions/xai/provider-catalog.ts:271, a26df7153f81)
  • PR implementation site: The PR-head destructures its older fallback and passes it directly to model discovery, carrying the new header but not the newer default-model selection flow present on current main. (extensions/xai/provider-catalog.ts:206, 98cc441f8a04)
  • Header delivery seam: Catalog projection retains provider headers, inline model construction propagates them into request configuration, and the registry merges provider headers into request authentication headers. This supports the selected provider-level seam once the branch is rebased. (src/plugins/provider-catalog-result.ts:11, a26df7153f81)
  • Feature-history routing: Current-main blame assigns the OAuth catalog and entry-path lines to the shallow-history boundary commit, while shortlog shows Peter Steinberger and Vincent Koc as the most frequent contributors across the affected xAI files; ownership routing is therefore shared rather than singular. (extensions/xai/provider-catalog.ts:271, 951f13023d7f)
  • Current-main-only check: The checked-out current main does not contain x-grok-client-version in the xAI OAuth catalog, so this PR is not superseded or implemented on main. The latest release supplied for review is v2026.7.1, and no local release provenance establishes a shipped fix. (extensions/xai/provider-catalog.ts:48, a26df7153f81)

Likely related people:

  • Dallin Romney: Current-main blame attributes the OAuth catalog and plugin entry lines that must be preserved during conflict resolution to the available history boundary commit. (role: recent current-main contributor; confidence: medium; commits: 951f13023d7f; files: extensions/xai/provider-catalog.ts, extensions/xai/index.ts)
  • steipete: The local feature shortlog identifies Peter Steinberger as the largest contributor across the affected xAI catalog and entry files. (role: frequent feature-history contributor; confidence: medium; commits: 7bd7d7d2a13c; files: extensions/xai/provider-catalog.ts, extensions/xai/index.ts)
  • Vincent Koc: Recent history includes xAI-focused maintenance by Vincent Koc, and the local shortlog shows sustained contribution to these provider files. (role: recent adjacent area contributor; confidence: medium; commits: a4496a7778c1; files: extensions/xai/provider-catalog.ts, extensions/xai/index.ts)

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.

History

Review history (30 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-30T23:22:27.084Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Compose the Grok header with configured xAI headers
  • reviewed 2026-07-31T02:58:11.863Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Compose the required header with configured xAI headers
  • reviewed 2026-07-31T05:28:46.321Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Compose the mandatory header with configured xAI headers
  • reviewed 2026-07-31T07:01:00.164Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Compose the mandatory header with configured xAI headers
  • reviewed 2026-08-01T05:54:33.827Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Compose the mandatory header with configured xAI headers
  • reviewed 2026-08-01T11:22:24.212Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Preserve current OAuth default-model selection
  • reviewed 2026-08-01T11:29:01.701Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Preserve OAuth default-model selection
  • reviewed 2026-08-01T15:07:33.608Z sha 98cc441 :: needs real behavior proof before merge. :: [P1] Preserve OAuth default-model selection after rebasing

@Takhoffman

Copy link
Copy Markdown
Contributor

@clawsweeper automerge

@clawsweeper

clawsweeper Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🔧
ClawSweeper automerge is enabled.

Draft PRs stay fix-only until GitHub marks them ready for review. Pause with /clawsweeper stop.

Automerge progress:

  • 2026-07-25 14:23:23 UTC review result reused 98cc441f8a04 (complete)
  • 2026-08-01 23:43:44 UTC review queued 98cc441f8a04 (queued)

@clawsweeper clawsweeper Bot added clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Resolve merge risk (P1) - An existing operator who overrides the xAI OAuth base URL will now send x-grok-client-version to that overridden endpoint. The value is non-secret, but this changes the outbound proto... (sha=1166ddcd891a393387a1ff23a5386e770a74046b)

Why human review is needed:
This item has security-sensitive risk. ClawSweeper is pausing instead of making an autonomous change that could affect trust, credentials, permissions, or exposure.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If the security-sensitive detail still needs changes, describe the safe path or push the fix, then comment @clawsweeper automerge. If the risk should not be automated, keep the PR paused for manual review or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@Takhoffman

Copy link
Copy Markdown
Contributor

@clawsweeper approve

@clawsweeper clawsweeper Bot added clawsweeper:human-review Needs maintainer review before ClawSweeper can continue merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed clawsweeper:human-review Needs maintainer review before ClawSweeper can continue rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 25, 2026
@jzakirov

Copy link
Copy Markdown
Contributor Author

@Takhoffman it seems claw sweeper died mid-review and never actually merged this PR

@jzakirov
jzakirov force-pushed the fix/xai-grok-oauth-client-version branch from 1166ddc to 6b57d1d Compare July 27, 2026 08:19
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: - [ ] Add real behavior proof - Needs stronger real behavior proof before merge: The PR body has a redacted direct-proxy before/after result, but it does not demonstrate a successful final-head OpenClaw OAuth agent...; Review finding: [P1] Compose the mandatory header with configured xAI headers — extensions/xai/provider-catalog.ts:48-65 - [low] Verify OAuth request-header handling — extensions/... (sha=98cc441f8a048972874bf6ea49095c13b6d51b1f)

Why human review is needed:
ClawSweeper found a blocker that should be resolved or accepted by a maintainer before the repair or automerge loop continues.

What the maintainer can do as a next step:
If the maintainer accepts the current risk and wants ClawSweeper to continue merge gates, comment @clawsweeper approve. If more work is needed, resolve the blocker first, then comment @clawsweeper automerge to re-review and continue. If automation should stay paused, leave clawsweeper:human-review in place or comment @clawsweeper stop.

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. clawsweeper:human-review Needs maintainer review before ClawSweeper can continue merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(xai): Grok subscription inference fails with HTTP 426 on every request This is item 1/1 in the current shard. Shard 9/44.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper 🐠 reef update

Thanks for the contribution here. ClawSweeper could not safely push to this branch, so it opened a replacement PR from a writable branch and carried the contributor trail along with it.

Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
Replacement PR: #117704
Why close: this run explicitly closes the superseded source PR after the credited replacement PR is open, so review continues in one place.
Closing this source PR only because source-PR closing was explicitly enabled for this run.
Credit follows the fix over to the replacement PR. no sneaky treasure grab.
Co-author credit kept:

fish notes: reasoning high; reviewed against 6e1e9c5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge extensions: xai merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: xAI OAuth (Grok subscription) inference always fails with HTTP 426 — no Grok CLI client-version header sent to cli-chat-proxy.grok.com

2 participants