Expose model picker agent runtimes#90328
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 1:25 AM ET / 05:25 UTC. Summary PR surface: Source +112, Tests +256, Docs +12, Other +4. Total +384 across 13 files. Reproducibility: not applicable. This PR adds a metadata/display capability rather than fixing a current-main bug. The contributor supplied PR-head Gateway JSON plus WebUI picker screenshot proof for the new behavior. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Use Do we have a high-confidence way to reproduce the issue? Not applicable; this PR adds a metadata/display capability rather than fixing a current-main bug. The contributor supplied PR-head Gateway JSON plus WebUI picker screenshot proof for the new behavior. Is this the best way to solve the issue? Yes as an implementation shape, pending maintainer acceptance. Deriving runtime metadata in Gateway from existing runtime policy preserves canonical model ids and avoids a separate display-only routing classifier. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 751a6c23f098. Label changesLabel justifications:
Evidence reviewedPR surface: Source +112, Tests +256, Docs +12, Other +4. Total +384 across 13 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Addressed the ClawSweeper feedback in
Focused proof from the patched branch: Also reran @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review after adding the implicit Codex runtime fix/proof to the PR body. |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
Follow-up |
|
🦞👀 Command router queued. I will update this comment with the next step. |
b6a0a24 to
c24a15e
Compare
|
Rebased onto latest |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Follow-up |
|
🦞👀 Command router queued. I will update this comment with the next step. |
6d8ec07 to
9708d7c
Compare
|
Rebased again onto latest |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Follow-up |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review Current-head proof was refreshed because the previous PR body still referenced stale head What changed:
Current-head checks rerun:
Result:
|
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review Current head Validation on this head:
The PR body and linked proof README were refreshed to the current head; the latest commit is docs-only and does not change the visual/runtime behavior shown by the existing screenshot artifact. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review I regenerated the proof with an actual temporary Gateway built from this PR head plus the real Control UI served by that Gateway, and updated the PR body under Real PR-head Gateway/WebUI proof. New artifacts include:
This replaces the earlier helper/screenshot-only proof. |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review The PR body proof section is now in the exact policy-recognized The section now includes actual PR-head Gateway/WebUI evidence: real |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Thanks @ooiuuii for the unusually strong Gateway/WebUI proof here, including the PR-head response and picker capture. That work helped make the runtime-observability contract concrete. This is superseded by The canonical contract intentionally does not put a presentation label into the wire payload. That leaves this branch's remaining Closing as superseded, with thanks. If a UI owner wants runtime suffixes in model selectors, the rendering tests and screenshot proof here are excellent re-port material for a small UI-only follow-up built on the shipped |
Summary
agentRuntimemetadata tomodels.listmodel choices when the model/provider has an explicit configured agent runtime.GPT-5.5 · OpenAI Codex) without changing the canonical model value (openai/gpt-5.5).Refs #90420 (real 6.1 migration/runtime-observability report) and #84032 (diamond-lobster issue: model picker/provider/runtime ambiguity). Related to #90036 and #90047 because the live Windows 6.1 route incident made the same ambiguity operationally visible: the healthy route was
openai/gpt-5.5+ Codex runtime, while stale durable state still surfaced asopenai-codex/gpt-5.5.Why
After the 2026.6.1 Codex migration, a healthy route can be:
The picker previously only exposed/displayed provider/model metadata, so operators could not tell whether an
openai/*model was configured to run through Codex or through the default OpenClaw route. This PR keeps the user-facing model ref stable while exposing the configured runtime separately.Verification
node scripts/run-vitest.mjs ui/src/ui/chat-model-ref.test.ts --testNamePattern "surfaces configured agent runtime metadata"node --import tsxbehavior script foraddConfiguredAgentRuntimeMetadata→MODELS_LIST_RUNTIME_METADATA_OKgit diff --checkpnpm tsgo:test:uiNote:
node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.test.ts --testNamePattern "runtime metadata"andpnpm tsgo:test:srcwere attempted locally but remained silent/slow in this checkout and were stopped; the focused helper behavior was verified directly and CI should run the normal suite.Review fix proof
Addressed ClawSweeper's implicit-runtime feedback in
a971a356.Focused proof from the patched branch:
The picker now distinguishes both default implicit OpenAI → Codex routing and explicit OpenClaw runtime overrides while still omitting compact implicit default/OpenClaw/auto metadata for unrelated providers.
Real behavior proof (actual PR-head Gateway/WebUI; current head:
bc62b391bf7f7c9e6ea722c5fd746ded2a5da612)Regenerated on 2026-06-08 from an actual temporary Gateway built from this PR head and the real Control UI served by that Gateway. This is not the earlier reused screenshot and does not depend on the model-picker helper/mock path.
openai/gpt-5.5choices routed through the Codex runtime, and render that runtime in the WebUI Chat model picker asGPT-5.5 · OpenAI Codexwithout changing the canonical model id/provider.bc62b391bf7f7c9e6ea722c5fd746ded2a5da612, built and run with the source CLI/Gateway from that head (OpenClaw 2026.6.2 (bc62b39)) using isolated profile/home/tmp/openclaw-pr90328-proof/home, profilepr90328proof, Gatewayhttp://127.0.0.1:19129. Channels were skipped withOPENCLAW_SKIP_CHANNELS=1; only thecodexruntime plugin loaded. Auth/token secrets were not required. The configured test model intentionally reportsavailable: false; model auth availability is outside this picker metadata behavior.models.listresponse: models-list-pr-head-real-gateway-20260608.jsonopenai/gpt-5.5row: models-list-pr-head-gpt55-row-20260608.jsonActual Gateway
models.listrow excerpt from the temporary PR-head Gateway:{ "id": "gpt-5.5", "name": "GPT-5.5", "provider": "openai", "api": "openai-responses", "available": false, "agentRuntime": { "id": "codex", "source": "model", "label": "OpenAI Codex" } }provider: "openai",id: "gpt-5.5") while exposing runtime metadata separately asagentRuntime.id = "codex"/label = "OpenAI Codex". The real PR-head Control UI consumes that response and renders the model picker selected option asGPT-5.5 · OpenAI Codex; the captured visible label text wasGPT-5.5 · OpenAI Codex · Medium.Supporting current-head checks retained from the earlier refresh: