Skip to content

Expose model picker agent runtimes#90328

Closed
ooiuuii wants to merge 9 commits into
openclaw:mainfrom
ooiuuii:agent/xiaozhua/model-runtime-observability
Closed

Expose model picker agent runtimes#90328
ooiuuii wants to merge 9 commits into
openclaw:mainfrom
ooiuuii:agent/xiaozhua/model-runtime-observability

Conversation

@ooiuuii

@ooiuuii ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds additive agentRuntime metadata to models.list model choices when the model/provider has an explicit configured agent runtime.
  • Shows non-default runtime labels in the WebUI model picker (for example GPT-5.5 · OpenAI Codex) without changing the canonical model value (openai/gpt-5.5).
  • Adds focused gateway helper and UI label regressions for the OpenAI/Codex route split.

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 as openai-codex/gpt-5.5.

Why

After the 2026.6.1 Codex migration, a healthy route can be:

model ref: openai/gpt-5.5
runtime: codex

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 tsx behavior script for addConfiguredAgentRuntimeMetadataMODELS_LIST_RUNTIME_METADATA_OK
  • git diff --check
  • pnpm tsgo:test:ui

Note: node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.test.ts --testNamePattern "runtime metadata" and pnpm tsgo:test:src were 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:

implicitCodex.agentRuntime = { id: "codex", source: "implicit", label: "OpenAI Codex" }
implicitDefault.agentRuntime = omitted
explicitOpenClaw.agentRuntime = { id: "openclaw", source: "model", label: "OpenClaw Default" }
labels = ["GPT-5.5 · OpenAI Codex", "GPT-5.5 · OpenClaw Default"]
RUNTIME_METADATA_REVIEW_FIX_OK

node scripts/run-vitest.mjs ui/src/ui/chat-model-ref.test.ts --testNamePattern "agent runtime|OpenClaw runtime"
✓ ui/src/ui/chat-model-ref.test.ts (25 tests | 23 skipped)
Tests 2 passed | 23 skipped

git diff --check

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.

  • Behavior or issue addressed: expose material runtime metadata for canonical openai/gpt-5.5 choices routed through the Codex runtime, and render that runtime in the WebUI Chat model picker as GPT-5.5 · OpenAI Codex without changing the canonical model id/provider.
  • Real environment tested: PR Expose model picker agent runtimes #90328 head 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, profile pr90328proof, Gateway http://127.0.0.1:19129. Channels were skipped with OPENCLAW_SKIP_CHANNELS=1; only the codex runtime plugin loaded. Auth/token secrets were not required. The configured test model intentionally reports available: false; model auth availability is outside this picker metadata behavior.
  • Exact steps or command run after this patch:
cd /Users/luyifan/.openclaw/workspace/openclaw-src
git rev-parse HEAD
# bc62b391bf7f7c9e6ea722c5fd746ded2a5da612

env -i HOME=/tmp/openclaw-pr90328-proof/home PATH="$PATH" OPENCLAW_GATEWAY_PORT=19129 OPENCLAW_SKIP_CHANNELS=1 \
  node scripts/run-node.mjs --profile pr90328proof gateway run --port 19129 --force --verbose

env -i HOME=/tmp/openclaw-pr90328-proof/home PATH="$PATH" OPENCLAW_GATEWAY_PORT=19129 OPENCLAW_SKIP_CHANNELS=1 \
  node scripts/run-node.mjs --profile pr90328proof gateway call models.list --params '{"view":"configured"}' --json

# Browser/CDP opened the same real Control UI:
# http://127.0.0.1:19129/chat?session=agent%3Amain%3Amain
# and captured the open chat model picker screenshot.

Actual PR-head WebUI picker showing GPT-5.5 · OpenAI Codex

Actual Gateway models.list row 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"
  }
}
  • Observed result after fix: the real PR-head Gateway preserves the canonical public choice (provider: "openai", id: "gpt-5.5") while exposing runtime metadata separately as agentRuntime.id = "codex" / label = "OpenAI Codex". The real PR-head Control UI consumes that response and renders the model picker selected option as GPT-5.5 · OpenAI Codex; the captured visible label text was GPT-5.5 · OpenAI Codex · Medium.
  • What was not tested: real OAuth inference, channel delivery, commentary/progress streams, native Swift UI display, or session migration behavior. Those are intentionally outside this PR's WebUI/Gateway metadata scope.

Supporting current-head checks retained from the earlier refresh:

node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.test.ts ui/src/ui/chat-model-ref.test.ts --testNamePattern="models.list|agentRuntime|label|alias|OpenAI Codex"

✓ src/gateway/server-methods/models-list-result.test.ts (gateway-client) 5 passed
✓ src/gateway/server-methods/models-list-result.test.ts (gateway-methods) 5 passed
✓ ui/src/ui/chat-model-ref.test.ts 6 passed | 19 skipped

node scripts/run-vitest.mjs src/gateway/server-methods/models.test.ts --testNamePattern=models.list
✓ 24 passed

node scripts/run-vitest.mjs src/commands/model-picker.test.ts --testNamePattern="runtime model picker visibility"
✓ 1 passed | 63 skipped

pnpm exec oxfmt --check docs/gateway/protocol.md
git diff --check
# docs protocol formatting and diff checks passed

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: S labels Jun 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label Jun 4, 2026
@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 1:25 AM ET / 05:25 UTC.

Summary
The PR adds optional agentRuntime metadata to Gateway models.list, generated Swift protocol decoding, docs/tests, and WebUI model-picker runtime suffix labels.

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.

  • Gateway protocol field: 1 optional response field added. The field is additive, but it becomes a documented client-facing models.list contract once merged.

Stored data model
Persistent data-model change detected: vector/embedding metadata: docs/gateway/protocol.md, vector/embedding metadata: src/gateway/server-methods/models-list-result.test.ts, vector/embedding metadata: src/gateway/server-methods/models-list-result.ts, vector/embedding metadata: src/gateway/server-methods/models-list-runtime-metadata.ts, vector/embedding metadata: ui/src/ui/chat-model-ref.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Get maintainer confirmation that ModelChoice.agentRuntime is the canonical public metadata shape before merge.

Risk before merge

  • [P1] The new ModelChoice.agentRuntime field is optional and additive, but documenting it makes it a public Gateway/client contract that maintainers should accept before merge.
  • [P1] The open CLI/OAuth/API picker PR uses a different runtimeLabel direction, so maintainers should choose one model-choice metadata shape before landing overlapping picker work.

Maintainer options:

  1. Accept agentRuntime as canonical
    Approve this field as the public optional model-choice runtime metadata and require overlapping picker PRs to build on it.
  2. Consolidate metadata first
    Pause merge until the overlapping runtimeLabel/integration-label work converges on one Gateway model-choice field shape.
  3. Hold for API owner decision
    Keep the PR open until Gateway and client owners confirm the documented field name, payload shape, and Swift generated surface are acceptable.

Next step before merge

  • [P2] The remaining action is maintainer/API-owner review of the public Gateway field and overlap with adjacent picker-label work, not an automated code repair.

Security
Cleared: The diff changes protocol schema/types, Gateway response metadata, WebUI display logic, docs, generated Swift types, and tests without adding dependencies, workflows, secrets handling, or code-execution hooks.

Review details

Best possible solution:

Use ModelChoice.agentRuntime as the canonical optional runtime-display metadata only if Gateway/client owners accept the public field, and route overlapping picker work to reuse or intentionally replace that contract.

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 changes

Label justifications:

  • P2: This is a bounded Gateway/WebUI ergonomics improvement with limited blast radius but real public protocol review needs.
  • merge-risk: 🚨 compatibility: The PR adds and documents a new models.list response field that clients may start depending on.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body includes PR-head Gateway JSON plus a real Control UI picker screenshot from the same temporary Gateway showing GPT-5.5 · OpenAI Codex.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes PR-head Gateway JSON plus a real Control UI picker screenshot from the same temporary Gateway showing GPT-5.5 · OpenAI Codex.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes PR-head Gateway JSON plus a real Control UI picker screenshot from the same temporary Gateway showing GPT-5.5 · OpenAI Codex.
Evidence reviewed

PR surface:

Source +112, Tests +256, Docs +12, Other +4. Total +384 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 6 117 5 +112
Tests 4 262 6 +256
Docs 1 12 0 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 2 6 2 +4
Total 13 397 13 +384

What I checked:

  • Root and scoped policy read: Root and scoped AGENTS.md files were read; Gateway protocol changes are additive-first but compatibility-sensitive, and Codex-related review required dependency source inspection. (AGENTS.md:1, 751a6c23f098)
  • Current main lacks model-choice runtime metadata: Current main ModelChoiceSchema exposes selector fields through reasoning but has no agentRuntime field on model choices, so the central behavior is not already implemented on main. (packages/gateway-protocol/src/schema/agents-models-skills.ts:15, 751a6c23f098)
  • PR adds optional public metadata shape: The PR adds optional agentRuntime with id, label, and constrained source values to the Gateway model-choice schema and documents it as display metadata while preserving id as the canonical request value. (packages/gateway-protocol/src/schema/agents-models-skills.ts:21, bc62b391bf7f)
  • Runtime metadata uses current owner path: Current main resolves model-backed runtime metadata via resolveModelAgentRuntimeMetadata, which delegates to resolveAgentHarnessPolicy; the PR derives picker metadata from that existing runtime-policy path instead of adding a separate classifier. (src/agents/agent-runtime-metadata.ts:8, 751a6c23f098)
  • Gateway projection point inspected: Current main builds public model entries after stripping runtime-only provider params and checking availability; the PR wires runtime display metadata after this projection, so canonical model ids and availability fields remain intact. (src/gateway/server-methods/models-list-result.ts:197, 751a6c23f098)
  • WebUI label behavior inspected: Current main builds model-picker display labels from catalog entries and qualified keys; the PR appends non-default runtime labels while preserving explicit aliases verbatim. (ui/src/ui/chat-model-ref.ts:187, bc62b391bf7f)

Likely related people:

  • Vincent Koc: Available current-main blame attributes the central Gateway, protocol, UI display, and runtime-metadata source snapshot to Vincent Koc; deeper history is unavailable in this checkout. (role: recent area contributor; confidence: medium; commits: 497d53d821e6; files: src/gateway/server-methods/models-list-result.ts, src/agents/agent-runtime-metadata.ts, src/agents/harness/policy.ts)
  • Kirchlive: Opened overlapping model-picker metadata PRs using the alternative runtimeLabel shape, including one closed as superseded by this PR and one still open with broader CLI/OAuth/API labels. (role: adjacent contributor; confidence: medium; commits: 8944dada24b7, 98721db4ceb7; files: packages/gateway-protocol/src/schema/agents-models-skills.ts, src/gateway/server-methods/models-list-result.ts, src/tui/tui-command-handlers.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 4, 2026
@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the ClawSweeper feedback in a971a356:

  • models.list now exposes implicit OpenAI → Codex runtime metadata (source: "implicit") instead of only explicit model/provider runtime overrides.
  • Explicit openclaw runtime overrides remain visible (source: "model"), so operators can distinguish openai/gpt-5.5 + OpenAI Codex from openai/gpt-5.5 + OpenClaw Default.
  • Implicit default/OpenClaw/auto metadata for unrelated providers stays omitted to keep legacy payloads compact.

Focused proof from the patched branch:

implicitCodex.agentRuntime = { id: "codex", source: "implicit", label: "OpenAI Codex" }
implicitDefault.agentRuntime = omitted
explicitOpenClaw.agentRuntime = { id: "openclaw", source: "model", label: "OpenClaw Default" }
labels = ["GPT-5.5 · OpenAI Codex", "GPT-5.5 · OpenClaw Default"]
RUNTIME_METADATA_REVIEW_FIX_OK

node scripts/run-vitest.mjs ui/src/ui/chat-model-ref.test.ts --testNamePattern "agent runtime|OpenClaw runtime"
✓ ui/src/ui/chat-model-ref.test.ts (25 tests | 23 skipped)
Tests 2 passed | 23 skipped

Also reran git diff --check in the same gate.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 4, 2026
@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review after adding the implicit Codex runtime fix/proof to the PR body.

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up b6a0a24063 updates the existing models.list tests whose exact payload expectations predated this PR. They now expect the intentionally added implicit OpenAI Codex agentRuntime metadata on OpenAI catalog rows. Focused behavior probe passed: models.list returns { provider: "openai", agentRuntime: { id: "codex", source: "implicit", label: "OpenAI Codex" } } for an OpenAI catalog row; git diff --check passed. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@ooiuuii
ooiuuii force-pushed the agent/xiaozhua/model-runtime-observability branch from b6a0a24 to c24a15e Compare June 4, 2026 13:56
@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto latest origin/main as c24a15e0bf to pick up current protocol/guard baselines. Focused behavior probe still passes after rebase: models.list returns implicit OpenAI Codex agentRuntime metadata for OpenAI catalog rows; git diff --check passed. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up 6d8ec075f8 updates the gateway models.list integration expectations in server.models-voicewake-misc.test.ts so OpenAI rows include the new implicit OpenAI Codex runtime metadata. This is the same intentional payload addition already covered in the lower-level models.list tests. git diff --check passed; local Vitest for this shard again stalled with no output in my environment, so CI is the authoritative rerun. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@ooiuuii
ooiuuii force-pushed the agent/xiaozhua/model-runtime-observability branch from 6d8ec07 to 9708d7c Compare June 4, 2026 14:11
@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Rebased again onto latest origin/main as 9708d7c9e2 after main advanced. Correct focused behavior probe passes: addConfiguredAgentRuntimeMetadata(...) adds { id: "codex", label: "OpenAI Codex", source: "implicit" } to OpenAI catalog rows when the default runtime is Codex; git diff --check passed. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@ooiuuii

ooiuuii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up ac572e771e regenerates the Swift bundled protocol model so ModelChoice includes agentRuntime. Verification passed: pnpm protocol:check, focused addConfiguredAgentRuntimeMetadata(...) behavior probe (PR4_PROTOCOL_BEHAVIOR_OK), and git diff --check. @clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@ooiuuii

ooiuuii commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current-head proof was refreshed because the previous PR body still referenced stale head e894e4b110c7563844d16ed4a006e28972dece8a while the PR now points at 93c00a0991be148f357f8b0706080883528b210d.

What changed:

  • refreshed the PR body Real behavior proof section to current head 93c00a0991be148f357f8b0706080883528b210d
  • refreshed the proof branch artifacts/README for the same current head
  • reran current-head metadata helper and focused Gateway/UI tests
  • local proof policy evaluator passes and the PR body no longer contains the stale e894e4b... head

Current-head checks rerun:

  • node --import tsx /tmp/pr90328-current-head-proof/models-list-current-head.mjs
  • node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.test.ts ui/src/ui/chat-model-ref.test.ts --testNamePattern="models.list|agentRuntime|label|alias|OpenAI Codex"

Result:

  • models.list output preserves canonical provider: "openai" / id: "gpt-5.5" and adds agentRuntime.id = "codex", label = "OpenAI Codex"
  • Gateway models-list focused tests: 10 passed
  • UI chat-model-ref focused group: 6 passed / 19 skipped

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@ooiuuii

ooiuuii commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head bc62b391bf7 addresses the remaining P2 by documenting optional models.list agentRuntime metadata in docs/gateway/protocol.md, including id, label, and source values (implicit, model, provider, session-key).

Validation on this head:

  • pnpm exec oxfmt --check docs/gateway/protocol.md passed
  • git diff --check passed
  • node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.test.ts --testNamePattern="runtime metadata" → 10 passed
  • node scripts/run-vitest.mjs ui/src/ui/chat-model-ref.test.ts --testNamePattern="models.list|agentRuntime|label|alias|OpenAI Codex" → 6 passed / 19 skipped
  • node scripts/run-vitest.mjs src/gateway/server-methods/models.test.ts --testNamePattern=models.list → 24 passed
  • node scripts/run-vitest.mjs src/commands/model-picker.test.ts --testNamePattern="runtime model picker visibility" → 1 passed / 63 skipped

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.

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@ooiuuii

ooiuuii commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@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:

  • actual models.list response from PR head bc62b391bf7f7c9e6ea722c5fd746ded2a5da612
  • filtered openai/gpt-5.5 row showing agentRuntime: { id: "codex", source: "model", label: "OpenAI Codex" }
  • actual WebUI picker screenshot from the same PR-head Gateway showing GPT-5.5 · OpenAI Codex

This replaces the earlier helper/screenshot-only proof.

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@ooiuuii

ooiuuii commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The PR body proof section is now in the exact policy-recognized Real behavior proof format, and the latest GitHub Real behavior proof check for this PR head has passed.

The section now includes actual PR-head Gateway/WebUI evidence: real models.list JSON, the filtered openai/gpt-5.5 row with Codex agentRuntime, and a real Control UI picker screenshot from the same temporary PR-head Gateway.

@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@steipete

Copy link
Copy Markdown
Contributor

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 3c8269ca52fa1031f0f0239ea3dd1cfae3323b66, which landed ModelChoice.agentRuntime as the canonical additive Gateway field while folding the Codex text provider into OpenAI. Current ModelChoice reuses one GatewayAgentRuntime contract with id, optional fallback, and source provenance (protocol schema). The models.list projection derives that field from the existing harness-policy owner and keeps route/auth details private (projection helper, projection call). Route-aware tests cover both implicit Codex/OpenClaw selection and explicit configured Codex intent (coverage).

The canonical contract intentionally does not put a presentation label into the wire payload. That leaves this branch's remaining · OpenAI Codex picker suffix as a separate UI/product decision, not protocol work that should be rebased wholesale.

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 ModelChoice.agentRuntime field.

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

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M stale Marked as stale due to inactivity 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.

2 participants