Repository navigation
feat(xai): use one curated catalog and concrete setup default - #142136
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 8, 2026, 11:46 AM ET / 15:46 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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
Decision needed
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
Agent review detailsSecurityNone. PR surfaceSource -193, Tests +381, Docs +21. Total +209 across 31 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
|
landpr-approve-unrelated-red |
|
Landed as Proof: Two real Gateway agent turns reached registered
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
Dependent openclaw/ci-gate failed because its selected lanes failed. |
* 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) ...
…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]>
…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 | | --- | --- | |  |  | Final-package model-list responses match both pictured comparisons. The native metadata remains readable: model name, 1M context, and Medium thinking. | Before | After | | --- | --- | |  |  | <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]>
…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 | | --- | --- | |  |  | Final-package model-list responses match both pictured comparisons. The native metadata remains readable: model name, 1M context, and Medium thinking. | Before | After | | --- | --- | |  |  | <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]>
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.