Skip to content

feat(xai): use one curated catalog and concrete setup default - #142136

Merged
obviyus merged 7 commits into
mainfrom
feat/xai-curated-catalog
Sep 8, 2026
Merged

obviyus merged 7 commits into
mainfrom
feat/xai-curated-catalog

Conversation

@obviyus

@obviyus obviyus commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #136257, #132487.

What Problem This Solves

Two setup methods used different default models, and a virtual automatic selection required another remote settings request. The new default also exposed unsupported tool reasoning settings.

Why This Change Was Made

The provider plugin owns one concrete setup default and curated catalog. Dynamic resolution shares its model definitions, while tool callers share per-model reasoning defaults. Doctor migrates retired subscription selections through its existing repair owner without replacing explicit models, account pins, settings, or fallback order.

User Impact

Fresh setup uses one default. Existing primary selections and authored models remain. Doctor replaces retired automatic subscription selections; custom endpoints retain their authored scope. Existing installations without tool overrides receive the new tool default. No schema or credential-store change is added.

Consumers: setup defaults, dynamic model lookup, tool requests, and Doctor selection repair use the shared definitions.

Evidence

Setup regressions failed before the fix. Source onboarding preserved explicit selections. Compiled commands verified account saving, migration, custom endpoints, and status. Two public agent turns exercised the registered search tool with expected settings against synthetic endpoints. Continuous integration lost communication before 25 jobs started; it was not green. Live account approval and inference were not tested.

@obviyus obviyus self-assigned this Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 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 extensions: xai size: XL maintainer Maintainer-authored PR labels Sep 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 8, 2026, 11:46 AM ET / 15:46 UTC.

ClawSweeper review

What this changes

The xAI plugin centralizes its curated model catalog, selects Grok 4.6 for setup and unconfigured server tools, and retires subscription auto selections through Doctor.

Merge readiness

⛔ Blocked before merge - 4 items remain

This remains distinct, useful work; current main and v2026.9.3 retain the split defaults. Prior actionable findings are resolved, and the new tool-boundary evidence addresses the previous proof request. No blocking code defect was found; the deliberate upgrade impact warrants explicit acceptance.

Priority: P2
Reviewed head: e0c1d383b5feb0cf8d702dafc326724bf7ae9a71
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent implementation with resolved findings and meaningful production-boundary evidence; the remaining choice concerns deliberate upgrade impact.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body records real onboarding and compiled Doctor/status outcomes, plus exact-head Gateway turns through registered x_search and real HTTP transport for Grok 4.6/low and explicit Grok 4.3/none. This addresses the prior tool-boundary request; synthetic upstream replies do not prove vendor acceptance, and the older Doctor binary is not attributed to the later onboarding fixes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body records real onboarding and compiled Doctor/status outcomes, plus exact-head Gateway turns through registered x_search and real HTTP transport for Grok 4.6/low and explicit Grok 4.3/none. This addresses the prior tool-boundary request; synthetic upstream replies do not prove vendor acceptance, and the older Doctor binary is not attributed to the later onboarding fixes.
Evidence reviewed 10 items Pinned introduction boundary: Reviewed the merge-base-to-head changes. The supplied test merge is stale, so endpoint drift was not treated as PR ownership or evidence that current-main behavior would be deleted.
Still necessary on main: Fetched main still selects xai/auto for fresh OAuth setup and retains grok-4.3 as the API-key default. It does not contain this concrete-default cutover.
Shipped compatibility contract: The latest supplied release, v2026.9.3, also contains the OAuth auto default. Retiring it therefore affects an established shipped selection.
Findings None None.
Security None None.

How this fits together

The xAI plugin turns account credentials, model selections, and catalog metadata into Grok requests. Its defaults affect onboarding and server tools, while Doctor repairs retired selections in saved configuration and sessions.

flowchart TD
  A[Account credentials] --> C[xAI plugin]
  B[Curated and authenticated catalogs] --> C
  C --> D[Setup and model selection]
  D --> E[Grok requests and tool results]
  F[Saved auto selections] --> G[Doctor route and policy checks]
  G --> D
Loading

Decision needed

Question Recommendation
Accept retiring shipped subscription auto selections through operator-run Doctor and switching unconfigured server tools to Grok 4.6? Accept the documented cutover: Proceed with the scoped Doctor migration and preserved explicit selections, acknowledging operator action and the live-provider evidence limit.

Why: The implementation and recorded upgrade controls support the intended change, but accepting the interruption and provider-availability tradeoff is a product-owner choice.

Before merge

  • Resolve merge risk (P1) - Existing subscription xai/auto selections stop resolving until Doctor repairs them or the operator selects a permitted concrete model.
  • Resolve merge risk (P1) - Installations without explicit server-tool models switch to Grok 4.6, changing pricing and account/model availability assumptions; the synthetic upstream proof does not establish live xAI acceptance.
  • Complete next step (P2) - Confirm acceptance of the documented Doctor migration and Grok 4.6 default changes, including their operator impact and live-provider evidence limit.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -193, Tests +381, Docs +21. Total +209 across 31 files.

View PR surface stats
Area Files Added Removed Net
Source 14 244 437 -193
Tests 14 585 204 +381
Docs 3 42 21 +21
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 31 871 662 +209

Review metrics

Metric Value Why it matters
Default and retirement scope 2 setup methods unified; 3 server-tool defaults changed; 1 route-scoped retirement The behavioral cutover affects existing installations as well as fresh setup.

Merge-risk options

Maintainer options:

  1. Accept the scoped upgrade (recommended)
    Accept the documented Doctor requirement and default-model change using the preserved-selection and real transport evidence.
  2. Separate consolidation from retirement
    Retain existing runtime defaults and auto compatibility until the operator-impact tradeoff is accepted.

Technical review

Best possible solution:

Use the shared catalog and existing Doctor repair owner, with explicit acceptance of the documented retirement and default changes before landing.

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

Not applicable as a single bug reproduction: this is an intentional catalog/default change, and the earlier concrete regressions are addressed by the current source and recorded controls.

Is this the best way to solve the issue?

Yes for the implementation: one manifest, the existing reasoning map, and the existing Doctor owner avoid competing mechanisms. The upgrade tradeoff still needs explicit acceptance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0bdd96b9b195.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body records real onboarding and compiled Doctor/status outcomes, plus exact-head Gateway turns through registered x_search and real HTTP transport for Grok 4.6/low and explicit Grok 4.3/none. This addresses the prior tool-boundary request; synthetic upstream replies do not prove vendor acceptance, and the older Doctor binary is not attributed to the later onboarding fixes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded xAI catalog and setup improvement without evidence of an urgent current outage.
  • merge-risk: 🚨 compatibility: Shipped subscription auto selections require an explicit Doctor repair or replacement after upgrade.
  • merge-risk: 🚨 auth-provider: Grok 4.6 becomes the default across setup and unconfigured tools without live account-acceptance evidence.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body records real onboarding and compiled Doctor/status outcomes, plus exact-head Gateway turns through registered x_search and real HTTP transport for Grok 4.6/low and explicit Grok 4.3/none. This addresses the prior tool-boundary request; synthetic upstream replies do not prove vendor acceptance, and the older Doctor binary is not attributed to the later onboarding fixes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body records real onboarding and compiled Doctor/status outcomes, plus exact-head Gateway turns through registered x_search and real HTTP transport for Grok 4.6/low and explicit Grok 4.3/none. This addresses the prior tool-boundary request; synthetic upstream replies do not prove vendor acceptance, and the older Doctor binary is not attributed to the later onboarding fixes.

Evidence

What I checked:

  • Pinned introduction boundary: Reviewed the merge-base-to-head changes. The supplied test merge is stale, so endpoint drift was not treated as PR ownership or evidence that current-main behavior would be deleted. (e0c1d383b5fe)
  • Still necessary on main: Fetched main still selects xai/auto for fresh OAuth setup and retains grok-4.3 as the API-key default. It does not contain this concrete-default cutover. (extensions/xai/onboard.ts:23, 0bdd96b9b195)
  • Shipped compatibility contract: The latest supplied release, v2026.9.3, also contains the OAuth auto default. Retiring it therefore affects an established shipped selection. (extensions/xai/onboard.ts:23, 1391f7cd2d40)
  • Scoped retirement and upgrade controls: The manifest retires auto only on the subscription host. The added Doctor tests cover preserved settings and profile pins, custom endpoints, missing pinned accounts, disallowed successors, and repeat repair. The existing repair owner and retirement metadata are unchanged since the first branch commit used for the recorded compiled Doctor proof. (extensions/xai/openclaw.plugin.json:107, e0c1d383b5fe)
  • Previous findings resolved: Supported non-curated families retain capability metadata; registered API-key setup now preserves the existing primary. All three server-tool callers use the shared reasoning map, preserving explicit Grok 4.3 behavior and Grok 4.5 omission. Documentation explicitly describes the changed defaults for existing installations. (extensions/xai/src/responses-tool-shared.ts:62, e0c1d383b5fe)
  • Updated runtime evidence and its limits: The captured PR body at sourceRevision 77f137b9160521b73cf2738adbb9b18576facab35d90bf818c9a279bdca192de records exact-head public Gateway turns through registered x_search and real HTTP transport: Grok 4.6 with low, explicit Grok 4.3 with none, nonce-bearing returned results, and bearer denial without upstream I/O. It separately records corrected source onboarding and older compiled Doctor/status proof. Synthetic upstream responses establish OpenClaw orchestration and serialization, not live xAI acceptance. The disclosed loader version differs by one patch version from the repository pin. (e0c1d383b5fe)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (8 earlier review cycles)
  • reviewed 2026-09-08T11:59:17.020Z sha 62e78a5 :: blocked before merge. :: [P1] Keep the setup default separate from server-tool defaults | [P1] Preserve capability metadata for supported non-curated aliases
  • reviewed 2026-09-08T12:07:28.175Z sha 23ffdac :: blocked before merge. :: [P1] Keep the setup default separate from server-tool defaults | [P1] Preserve capability metadata for supported non-curated aliases
  • reviewed 2026-09-08T12:23:41.960Z sha bd2a44b :: blocked before merge. :: [P1] Keep the setup default separate from server-tool defaults | [P1] Preserve capability metadata for supported non-curated aliases
  • reviewed 2026-09-08T13:29:28.886Z sha 8cd07aa :: blocked before merge. :: [P3] Update the documented server-tool defaults
  • reviewed 2026-09-08T13:48:54.184Z sha e080022 :: blocked before merge. :: none
  • reviewed 2026-09-08T14:07:01.036Z sha 17b766e :: blocked before merge. :: none
  • reviewed 2026-09-08T14:19:22.995Z sha 17b766e :: blocked before merge. :: none
  • reviewed 2026-09-08T14:46:13.279Z sha e0c1d38 :: blocked before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Sep 8, 2026
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 8, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 8, 2026
@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. labels Sep 8, 2026
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 142136
head: e0c1d38
run: 34239746949 attempt: 1
failed: build-artifacts job=102107028450 conclusion=failure
failed: check-additional-extension-package-boundary job=102107029047 conclusion=failure
failed: check-lint job=102107029045 conclusion=failure
failed: check-test-types-core-2 job=102107028872 conclusion=failure
failed: checks-node-changed-extensions-config-1 job=102107030603 conclusion=failure
failed: checks-node-changed-extensions-config-2 job=102107030600 conclusion=failure
failed: checks-node-compact-large-1 job=102107030105 conclusion=failure
failed: checks-node-compact-large-10 job=102107030181 conclusion=failure
failed: checks-node-compact-large-11 job=102107030555 conclusion=failure
failed: checks-node-compact-large-13 job=102107030339 conclusion=failure
failed: checks-node-compact-large-14 job=102107030638 conclusion=failure
failed: checks-node-compact-large-6 job=102107030042 conclusion=failure
failed: checks-node-compact-small-14 job=102107031005 conclusion=failure
failed: checks-node-compact-small-15 job=102107030489 conclusion=failure
failed: checks-node-compact-small-18 job=102107030585 conclusion=failure
failed: checks-node-compact-small-19 job=102107030901 conclusion=failure
failed: checks-node-compact-small-22 job=102107030566 conclusion=failure
failed: checks-node-compact-small-23 job=102107030407 conclusion=failure
failed: checks-node-compact-small-27 job=102107030594 conclusion=failure
failed: checks-node-compact-small-29 job=102107030516 conclusion=failure
failed: checks-node-compact-small-31 job=102107030518 conclusion=failure
failed: checks-node-compact-small-32 job=102107030570 conclusion=failure
failed: checks-node-compact-small-35 job=102107030627 conclusion=failure
failed: checks-node-compact-small-6 job=102107030537 conclusion=failure
failed: checks-node-compact-small-9 job=102107030202 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit b093cb4 into main Sep 8, 2026
141 of 169 checks passed
@obviyus
obviyus deleted the feat/xai-curated-catalog branch September 8, 2026 15:49
@obviyus

obviyus commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as b093cb48f60c from reviewed head e0c1d383b5fe.

Proof: Two real Gateway agent turns reached registered x_search, normal HTTP transport, and a private synthetic upstream. Default Grok 4.6 sent low; explicit Grok 4.3 retained none. Both final public replies contained the corresponding upstream nonce. Bearer denial preceded upstream access, and both process groups stopped empty.

  • Fix: One curated catalog and concrete setup default, preserved explicit tool requests and saved primary selections, and existing route-scoped Doctor repair. Production code is 193 lines smaller.
  • Preservation: Actual onboarding retained the selected model, authored rows, alias/settings and fallback order. Compiled Doctor/status controls retained account pins and custom endpoint scope. Independent public validation passed all four CLI clauses.
  • Review: Fresh exact-head local review passed B/B/B with zero findings, security cleared, sufficient product-path proof, and no outstanding decision.
  • Limits: The tool proof uses source execution and synthetic model/upstream replies. It does not establish live xAI account/model acceptance, model intelligence, or current packaged-build equivalence. Existing compiled CLI proof retains its separate build identity.

CI exception: Used the guarded standing approval record for completed run 34239746949, attempt 1. Every failed child below reports runner communication loss and no job steps; the aggregate reports those failed dependencies. This PR changes no workflow, runner, installer, dependency declaration or lockfile. These are infrastructure failures, not passing CI; no introducing source commit or matching main test failure is attributed. The guarded merger checked the exact failure set, clean review, live head, server authority and attribution.

All 25 failed child jobs
Job Observed failure
build-artifacts Lost runner communication; no job steps reported
check-additional-extension-package-boundary Lost runner communication; no job steps reported
check-lint Lost runner communication; no job steps reported
check-test-types-core-2 Lost runner communication; no job steps reported
checks-node-changed-extensions-config-1 Lost runner communication; no job steps reported
checks-node-changed-extensions-config-2 Lost runner communication; no job steps reported
checks-node-compact-large-1 Lost runner communication; no job steps reported
checks-node-compact-large-10 Lost runner communication; no job steps reported
checks-node-compact-large-11 Lost runner communication; no job steps reported
checks-node-compact-large-13 Lost runner communication; no job steps reported
checks-node-compact-large-14 Lost runner communication; no job steps reported
checks-node-compact-large-6 Lost runner communication; no job steps reported
checks-node-compact-small-14 Lost runner communication; no job steps reported
checks-node-compact-small-15 Lost runner communication; no job steps reported
checks-node-compact-small-18 Lost runner communication; no job steps reported
checks-node-compact-small-19 Lost runner communication; no job steps reported
checks-node-compact-small-22 Lost runner communication; no job steps reported
checks-node-compact-small-23 Lost runner communication; no job steps reported
checks-node-compact-small-27 Lost runner communication; no job steps reported
checks-node-compact-small-29 Lost runner communication; no job steps reported
checks-node-compact-small-31 Lost runner communication; no job steps reported
checks-node-compact-small-32 Lost runner communication; no job steps reported
checks-node-compact-small-35 Lost runner communication; no job steps reported
checks-node-compact-small-6 Lost runner communication; no job steps reported
checks-node-compact-small-9 Lost runner communication; no job steps reported

Dependent openclaw/ci-gate failed because its selected lanes failed.

vincentkoc added a commit that referenced this pull request Sep 8, 2026
* commit '04869ae4899ad0524c3287759798362b0d62fef8': (677 commits)
  fix(release): pin Kova census refresh (#142104)
  fix: doctor read-only database inspections time out on large agent databases (#142179)
  docs: align v2026.9.3 framing with release announcement (#142307)
  fix(ui): discover models when default-model pickers open (#142105)
  fix(ci): keep Docker upgrade seed baseline older than target (#142273)
  refactor(tests): reuse named OAuth credential fixtures (#142272)
  fix(ci): keep mobile release helpers out of source checks (#142115)
  chore(ui): refresh control ui locales (#142147)
  fix(active-memory): explain why recall was skipped (#138658)
  fix(media): preserve converted images with HEIC filenames (#142263)
  docs: add v2026.9.3 release notes (#142277)
  fix(ui): retire picker focus listeners together (#142258)
  fix(ui): keep menu hover colors consistent across themes (#142243)
  fix(release): keep changelog credits within verified history (#142261)
  fix: keep tool-finalizer placeholders private in message-only groups (#138645)
  perf(tui): carry prepared URL membership through rendering (#142262)
  test(ui): await activity cache imports before teardown (#142282)
  fix(qa): align auth and Workshop proofs with runtime contracts (#142280)
  feat(xai): use one curated catalog and concrete setup default (#142136)
  refactor(outbound): reuse prepared sendability facts (#142252)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…aw#142136)

Related: openclaw#136257

## What Problem This Solves

xAI setup has separate OAuth and API-key defaults, and its virtual `auto` selection depends on another remote settings request. This change gives both setup methods the concrete `xai/grok-4.6` default and one curated catalog. Existing explicit primary models remain selected, including through the registered non-interactive API-key method.

## Why This Change Was Made

The plugin manifest owns the six published rows and their known prices. Supported non-curated aliases and families retain their capabilities through the shared definition owner without joining that inventory or borrowing prices. Dynamic resolution uses that same owner. Authenticated discovery no longer reads `/settings` or invents an `auto` row.

All three Responses-tool callers reuse the existing model reasoning map. The default Grok 4.6 X-search request sends `low` effort instead of unsupported `none`. A shared per-model tool-default rule preserves explicit Grok 4.3 requests independently of the setup default: X-search retains `none`, while web search and code execution retain `low`. Grok 4.5 continues to omit effort. The documentation explains the new default for existing installations without tool-model overrides.

The concrete default and subscription-scoped `auto` retirement are intentional. Doctor uses its existing repair owner to migrate saved selections while preserving account pins, fallback order, model settings, and custom-endpoint scope. This adds no schema, store, or auth-probe mechanism.

Production: 193 fewer lines. Tests: 381 additional lines. Docs: 21 additional lines.

## User Impact

- Fresh OAuth and API-key setup use Grok 4.6 and its `Grok` alias. Existing primary models, fallbacks, and authored rows remain selected or configured.
- Ordinary API-key setup keeps curated inventory in the plugin; replace mode receives the curated rows.
- Supported aliases retain input, reasoning, and output-limit metadata. Zero prices mean unavailable estimates.
- Doctor repairs subscription `xai/auto` selections while retaining profile suffixes, settings, and fallback order. Custom endpoints retain their authored model and alias scope.

## Evidence

- The immutable feature baseline showed the former split defaults. Focused preservation and catalog controls passed after the cutover.
- Seven request/catalog regressions failed before the shared runtime repair. All 28 focused checks then passed. The first local review later exposed the missing explicit Grok 4.3 control: three new request cases failed before correction. All nine focused request cases now pass for Grok 4.6 defaults, explicit Grok 4.3, and explicit Grok 4.5 omission. These payload fixtures are source proof, not public tool execution.
- Independent public validation exposed an additional registered-setup overwrite. A regression through the actual registered method failed for an existing selection while its fresh-selection control passed. Both cases pass with the existing shared preservation option enabled.
- Real source CLI onboarding preserved an explicit Grok 4.5 primary, two authored rows with distinct limits and prices, the `Pinned` alias and temperature 0.7, and three ordered fallbacks. Its effective source binding matches this committed candidate.
- Four actual compiled public commands saved a second synthetic profile, migrated a profile-pinned subscription selection, preserved a custom endpoint and authored `auto` row, and resolved the retained alias through `models status`. The saved states and profile diagnostics accompany successful exits and empty stopped process groups.
- The same independent source-blind validator recorded passing observations for all four public behavior clauses. Exact source/build equivalence remains with the separate code-aware review.
- Proof identities remain distinct: corrected onboarding uses the candidate source; the unchanged Doctor/status paths use CI-built merge `45027323` from raw production `62e78a57`. That older binary's onboarding overwrite remains a recorded failure. It is not claimed to contain the later fixes.
- The earlier source Doctor attempted a forbidden UI build and remains a separate safety failure. Later Doctor proof uses genuine compiled assets. No source Doctor replay, live OAuth approval, vendor inference, or simultaneous-route proof is claimed.
- Focused formatting, boundary lint, assertion safety, and diff checks pass. Exact-head CI `34239746949` completed with 25 runner-communication failures and the dependent aggregate; each failed child reported no job steps. Full annotations identify lost self-hosted runner communication, without an executed source, type, lint, or test diagnostic. Earlier heads retain their separate infrastructure failures.
- Two actual source Gateway agent turns now complete through public `POST /v1/responses`, the registered `x_search` tool, normal HTTP transport, a private synthetic upstream, and the final public reply. The default tool sends Grok 4.6 with `low`; explicit Grok 4.3 retains `none`. Each upstream request and returned tool result carries its own nonce. Bearer denial makes no upstream request. The real model request exposes `x_search` and omits disallowed `code_execution`. Both process groups stopped empty.
- These turns use synthetic model-stream replies around the real tool request. They prove orchestration, serialization, HTTP transport, parsing, and public delivery; they do not prove live xAI account/model acceptance or model intelligence. A separate standalone `/tools/invoke` attempt was correctly refused for missing active-model context and remains recorded. No security policy was weakened.
- Tool proof uses this exact source head with the retained loader and dependency closure; the installed loader is 4.23.12 against root pin 4.23.13. No compiled-candidate equivalence or live-provider claim is made for these source runs. Fresh code-aware review must assess these limits alongside the retained independent CLI acceptance.

The contributor setup-probe PR openclaw#132487 remains separate; this PR does not adopt its overlay API or alter its branch.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Sep 17, 2026
…150128)

Model resolution, both spawn paths, catalog publication, aliases, and Doctor change together so unsupported selections cannot bypass the shared decision. Most added lines are regression tests.

## What Problem This Solves

A saved `Grok → xai/auto` alias could create a child that the native API rejected. A custom provider name could also make retired native `auto` appear usable in the picker. Provider recognition and an endpoint URL were being treated as model support. Refs #115617, #142136.

## Why This Change Was Made

Spawn and prepared aliases use the existing model resolver. Catalog publication and Doctor consume the same compiled retirement rules for the selected route. The catalog uses main's shared projection owner from #150509. Prepared aliases have one writer; Doctor keeps its existing config and session writers.

## User Impact

Unsupported explicit choices fail before child creation with recovery guidance. Automatic choices retain their primary and fallback order. Picker views omit known retired routes; the admin inventory retains saved definitions. Custom endpoints and logical provider/account choices remain intact.

## Compatibility

Native IDs need a definition, catalog support, or provider-owned resolution. This deliberately replaces #125931's endpoint-only inference: previously accepted unlisted native IDs need explicit definitions when their provider cannot resolve them. Custom/local endpoints, authored private models, and models supplied by native runtimes remain supported. Doctor repairs known retirements, preserves account pins and allowlists, and retains unresolved choices with guidance. It does not invent definitions for unverified IDs. No new configuration keys, schema, or protocol changes.

## Evidence

- The real Gateway regression fails with the browse filter removed and passes with it restored: retired native `personal/auto` disappears, while custom endpoint and admin inventory controls remain intact. Command: `node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/server.models-native-retirement.test.ts`.
- Final package `08e2f6002888` passed upgrades driven by published 2026.9.3 and 2026.9.4, followed by candidate startup and existing/new/custom conversations. Both preserved the seven original transcript events. All 26 Doctor commands passed, including repeated repair, logical native aliases, custom models, account pins, and allowlists.
- Both upgraded fixtures passed all 10 Telegram Test Server controls: retired/unknown rejection, native/custom/friendly-alias completion, and correct picker buttons. The previously missing 2026.9.3 custom-model reply is now observed.
- Four final-build Gateway cases passed: native account/history continuity, saved-token selection, a new reply across a 60-second process freeze, and recovery after a settled failure. Each matched exactly one intended test and left no child processes.
- Source coverage includes 172 model/Doctor/Gateway tests, 220 affected fixture tests, and focused delivery, hook, lifecycle, and compaction checks; these counts overlap. Production/test types, lint, formatting, size limits, assertion limits, exports, architecture, and test registration checks passed.

Limits: updater tests use `--no-restart` followed by separate candidate startup. The first 2026.9.3 update hit its shipped 30-second package-scan limit; the retained installation was verified intact, and one normal retry after a measured 11-second scan succeeded. Telegram uses the real Test Server with local model fixtures. An extra final-package fallback run completed through the Gateway and Telegram accepted its sends, but the recorder timed out before capturing user-side receipt; that run is not counted as passed. Earlier `b12d66a91bc1` fallback runs retain their original identity and successful observations.

## Consumers

Visible/background spawn, prompt aliases, model materialization, picker publication, and Doctor use the shared support facts. No public SDK contract changes.

## Invalidation

Existing config, catalog, account, and plugin owners control freshness. Alias hints belong to the prepared turn snapshot. Admission rechecks freshness after asynchronous resolution.

## Tests

Coverage includes native/custom/private models, selected routes, namespace identity, pins, fallback order, stale generations, and repeated Doctor repair. A separate follow-up answer defect from #149223 remains behind #126263's task-ownership prerequisite; its assertion remains active and this PR does not claim to fix it.

## Screenshots

Packaged comparison at `b12d66a91bc1`: native Personal Auto is removed, while custom Private Auto remains.

| Before | After |
| --- | --- |
| ![Before: native Auto is selectable](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/86ad7e678f0160bdc9fc4809b7e2e930750f12bf/retirement-before-8afb413.png) | ![After: native Auto is removed and custom Auto remains](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/86ad7e678f0160bdc9fc4809b7e2e930750f12bf/retirement-after-b12d66a.png) |

Final-package model-list responses match both pictured comparisons. The native metadata remains readable: model name, 1M context, and Medium thinking.

| Before | After |
| --- | --- |
| ![Before model picker](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/ce7158ba21ac5a4e9bf4d592febf86647bcbd899/before-picker.png) | ![After model picker](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/a4053b9fb3e81d74ecd505cbf7041a10c827fa98/after-picker.png) |

<details>
<summary>Production changes: +705 lines</summary>

The added code implements shared admission, native alias support, and Doctor repair. It adds no state manager or configuration surface.

| File | Net | Responsibility |
| --- | ---: | --- |
| `cli-runner/helpers.ts` | +4 | Pass prepared aliases |
| `cli-runner/prepare.ts` | 0 | Use async prompt preparation |
| `cli-runner/prompt-context.ts` | +33 | Capture the existing prepared owner |
| `model.configured-fallback.ts` | +10 | Apply shared support rules |
| `model.configured-overrides.ts` | +60 | Validate selected transport support |
| `model.provider-hooks.ts` | -55 | Defer hook binding through the existing resolver |
| `model.provider-hooks.types.ts` | +31 | Keep existing hook types separate |
| `model.provider-transport.ts` | +35 | Relocate existing transport resolution |
| `model.registry-resolution.ts` | -40 | Remove competing resolution paths |
| `model.static-catalog-row.ts` | +36 | Relocate existing row conversion |
| `model.static-catalog.ts` | +64 | Reuse canonical native metadata |
| `model.static-catalog.types.ts` | +2 | Keep donor facts in the existing cache |
| `model.ts` | +13 | Share resolution and recovery errors |
| `prepared-compaction-runtime.ts` | +1 | Pass prepared aliases |
| `attempt-system-prompt-prepare.ts` | +1 | Pass prepared aliases |
| `model-catalog-visibility.ts` | +20 | Filter retirement after route projection |
| `model-runtime-choice.ts` | +224 | Share admission across spawn paths |
| `openclaw-tools.ts` | 0 | Use current session configuration |
| `prepared-model-runtime.configured-completion.ts` | +88 | Prepare aliases without inventing catalog rows |
| `prepared-model-runtime.full-catalog.ts` | +9 | Publish captured alias facts |
| `prepared-model-runtime.types.ts` | +2 | Represent derived alias facts |
| `materialize-model.ts` | +4 | Share final route validation |
| `subagent-spawn-child-plan.ts` | -96 | Remove separate admission checks |
| `subagent-spawn-deps.ts` | -3 | Remove obsolete dependency surface |
| `subagent-spawn-plan.ts` | +42 | Consume shared admission |
| `subagent-spawn.runtime.ts` | -1 | Remove obsolete argument |
| `system-prompt-config.ts` | -2 | Render supplied facts only |
| `sessions-spawn-visible.ts` | 0 | Use common async admission |
| `commands-models.ts` | -4 | Use captured retirement metadata |
| `commands-system-prompt.ts` | +8 | Capture prompt facts before rendering |
| `model-runtime-normalization.ts` | +9 | Relocate existing normalization |
| `codex-route-session-repair.ts` | 0 | Use the session repair module |
| `retired-model-ref-repair.ts` | +8 | Use selected-route retirement policy |
| `retired-session-model-repair.ts` | +59 | Relocate existing session repair |
| `models-list-result.ts` | +1 | Pass captured metadata |
| `manifest-model-suppression.ts` | +136 | Compile native retirement policy once |
| `manifest-model-suppression.types.ts` | +6 | Carry effective route facts |

</details>

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…penclaw#150128)

Model resolution, both spawn paths, catalog publication, aliases, and Doctor change together so unsupported selections cannot bypass the shared decision. Most added lines are regression tests.

## What Problem This Solves

A saved `Grok → xai/auto` alias could create a child that the native API rejected. A custom provider name could also make retired native `auto` appear usable in the picker. Provider recognition and an endpoint URL were being treated as model support. Refs openclaw#115617, openclaw#142136.

## Why This Change Was Made

Spawn and prepared aliases use the existing model resolver. Catalog publication and Doctor consume the same compiled retirement rules for the selected route. The catalog uses main's shared projection owner from openclaw#150509. Prepared aliases have one writer; Doctor keeps its existing config and session writers.

## User Impact

Unsupported explicit choices fail before child creation with recovery guidance. Automatic choices retain their primary and fallback order. Picker views omit known retired routes; the admin inventory retains saved definitions. Custom endpoints and logical provider/account choices remain intact.

## Compatibility

Native IDs need a definition, catalog support, or provider-owned resolution. This deliberately replaces openclaw#125931's endpoint-only inference: previously accepted unlisted native IDs need explicit definitions when their provider cannot resolve them. Custom/local endpoints, authored private models, and models supplied by native runtimes remain supported. Doctor repairs known retirements, preserves account pins and allowlists, and retains unresolved choices with guidance. It does not invent definitions for unverified IDs. No new configuration keys, schema, or protocol changes.

## Evidence

- The real Gateway regression fails with the browse filter removed and passes with it restored: retired native `personal/auto` disappears, while custom endpoint and admin inventory controls remain intact. Command: `node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/server.models-native-retirement.test.ts`.
- Final package `08e2f6002888` passed upgrades driven by published 2026.9.3 and 2026.9.4, followed by candidate startup and existing/new/custom conversations. Both preserved the seven original transcript events. All 26 Doctor commands passed, including repeated repair, logical native aliases, custom models, account pins, and allowlists.
- Both upgraded fixtures passed all 10 Telegram Test Server controls: retired/unknown rejection, native/custom/friendly-alias completion, and correct picker buttons. The previously missing 2026.9.3 custom-model reply is now observed.
- Four final-build Gateway cases passed: native account/history continuity, saved-token selection, a new reply across a 60-second process freeze, and recovery after a settled failure. Each matched exactly one intended test and left no child processes.
- Source coverage includes 172 model/Doctor/Gateway tests, 220 affected fixture tests, and focused delivery, hook, lifecycle, and compaction checks; these counts overlap. Production/test types, lint, formatting, size limits, assertion limits, exports, architecture, and test registration checks passed.

Limits: updater tests use `--no-restart` followed by separate candidate startup. The first 2026.9.3 update hit its shipped 30-second package-scan limit; the retained installation was verified intact, and one normal retry after a measured 11-second scan succeeded. Telegram uses the real Test Server with local model fixtures. An extra final-package fallback run completed through the Gateway and Telegram accepted its sends, but the recorder timed out before capturing user-side receipt; that run is not counted as passed. Earlier `b12d66a91bc1` fallback runs retain their original identity and successful observations.

## Consumers

Visible/background spawn, prompt aliases, model materialization, picker publication, and Doctor use the shared support facts. No public SDK contract changes.

## Invalidation

Existing config, catalog, account, and plugin owners control freshness. Alias hints belong to the prepared turn snapshot. Admission rechecks freshness after asynchronous resolution.

## Tests

Coverage includes native/custom/private models, selected routes, namespace identity, pins, fallback order, stale generations, and repeated Doctor repair. A separate follow-up answer defect from openclaw#149223 remains behind openclaw#126263's task-ownership prerequisite; its assertion remains active and this PR does not claim to fix it.

## Screenshots

Packaged comparison at `b12d66a91bc1`: native Personal Auto is removed, while custom Private Auto remains.

| Before | After |
| --- | --- |
| ![Before: native Auto is selectable](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/86ad7e678f0160bdc9fc4809b7e2e930750f12bf/retirement-before-8afb413.png) | ![After: native Auto is removed and custom Auto remains](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/86ad7e678f0160bdc9fc4809b7e2e930750f12bf/retirement-after-b12d66a.png) |

Final-package model-list responses match both pictured comparisons. The native metadata remains readable: model name, 1M context, and Medium thinking.

| Before | After |
| --- | --- |
| ![Before model picker](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/ce7158ba21ac5a4e9bf4d592febf86647bcbd899/before-picker.png) | ![After model picker](https://gist.githubusercontent.com/obviyus/edbedb48d37b680d54f2047d457376e2/raw/a4053b9fb3e81d74ecd505cbf7041a10c827fa98/after-picker.png) |

<details>
<summary>Production changes: +705 lines</summary>

The added code implements shared admission, native alias support, and Doctor repair. It adds no state manager or configuration surface.

| File | Net | Responsibility |
| --- | ---: | --- |
| `cli-runner/helpers.ts` | +4 | Pass prepared aliases |
| `cli-runner/prepare.ts` | 0 | Use async prompt preparation |
| `cli-runner/prompt-context.ts` | +33 | Capture the existing prepared owner |
| `model.configured-fallback.ts` | +10 | Apply shared support rules |
| `model.configured-overrides.ts` | +60 | Validate selected transport support |
| `model.provider-hooks.ts` | -55 | Defer hook binding through the existing resolver |
| `model.provider-hooks.types.ts` | +31 | Keep existing hook types separate |
| `model.provider-transport.ts` | +35 | Relocate existing transport resolution |
| `model.registry-resolution.ts` | -40 | Remove competing resolution paths |
| `model.static-catalog-row.ts` | +36 | Relocate existing row conversion |
| `model.static-catalog.ts` | +64 | Reuse canonical native metadata |
| `model.static-catalog.types.ts` | +2 | Keep donor facts in the existing cache |
| `model.ts` | +13 | Share resolution and recovery errors |
| `prepared-compaction-runtime.ts` | +1 | Pass prepared aliases |
| `attempt-system-prompt-prepare.ts` | +1 | Pass prepared aliases |
| `model-catalog-visibility.ts` | +20 | Filter retirement after route projection |
| `model-runtime-choice.ts` | +224 | Share admission across spawn paths |
| `openclaw-tools.ts` | 0 | Use current session configuration |
| `prepared-model-runtime.configured-completion.ts` | +88 | Prepare aliases without inventing catalog rows |
| `prepared-model-runtime.full-catalog.ts` | +9 | Publish captured alias facts |
| `prepared-model-runtime.types.ts` | +2 | Represent derived alias facts |
| `materialize-model.ts` | +4 | Share final route validation |
| `subagent-spawn-child-plan.ts` | -96 | Remove separate admission checks |
| `subagent-spawn-deps.ts` | -3 | Remove obsolete dependency surface |
| `subagent-spawn-plan.ts` | +42 | Consume shared admission |
| `subagent-spawn.runtime.ts` | -1 | Remove obsolete argument |
| `system-prompt-config.ts` | -2 | Render supplied facts only |
| `sessions-spawn-visible.ts` | 0 | Use common async admission |
| `commands-models.ts` | -4 | Use captured retirement metadata |
| `commands-system-prompt.ts` | +8 | Capture prompt facts before rendering |
| `model-runtime-normalization.ts` | +9 | Relocate existing normalization |
| `codex-route-session-repair.ts` | 0 | Use the session repair module |
| `retired-model-ref-repair.ts` | +8 | Use selected-route retirement policy |
| `retired-session-model-repair.ts` | +59 | Relocate existing session repair |
| `models-list-result.ts` | +1 | Pass captured metadata |
| `manifest-model-suppression.ts` | +136 | Compile native retirement policy once |
| `manifest-model-suppression.types.ts` | +6 | Carry effective route facts |

</details>

Co-authored-by: Ayaan Zaidi <[email protected]>
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: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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