Repository navigation
Description
Summary
After the OpenClaw 2026.6.1 Codex migration, legacy openai-codex/* model references are supposed to become canonical openai/* model references with agentRuntime.id = "codex".
That route is functionally correct, but it is hard to verify from the model picker / models.list surface when the selected model visually looks like a plain OpenAI model. In a real upgrade, this made it easy to miss stale legacy route state in a live Telegram direct session.
Real environment
- OpenClaw: official
2026.6.1upgrade path from a 5.x install - Runtime shape: native Codex runtime with preserved OAuth/subscription auth
- Channel shape: Telegram direct session using the main agent
- Intended route after migration:
openai/gpt-5.5withagentRuntime.id = "codex" - Privacy note: direct chat ids, IPs, OAuth account ids, and tokens are intentionally redacted
Actual behavior observed
A new smoke session could look healthy after migration, while the existing real Telegram direct/main session still failed with:
Unknown model: openai-codex/gpt-5.5
The stale route was not obvious from the model picker/model-list surface because the repaired route also appears as openai/gpt-5.5 unless runtime metadata is visible separately.
Expected behavior
When a model choice is configured as an OpenAI model but routed through the Codex runtime, the Gateway/UI model surface should make that runtime visible while preserving the canonical selected model value.
For example, a repaired route should be observable as:
{
"provider": "openai",
"id": "gpt-5.5",
"name": "gpt-5.5",
"agentRuntime": {
"id": "codex",
"source": "model",
"label": "OpenAI Codex"
}
}This lets operators distinguish:
- plain
openai/gpt-5.5 openai/gpt-5.5routed through Codex- stale
openai-codex/*session/config state - explicit OpenClaw/default runtime overrides
Why this matters
Without visible runtime metadata, the safe 6.1 migration path is harder to audit:
- A newly-created smoke session can pass.
- A real existing Telegram/direct session can still contain stale
openai-codex/*state. - The healthy canonical route still displays as
openai/gpt-5.5unless runtime metadata is surfaced. - Operators can think migration is complete while real sessions still fail.
This is an observability/diagnostic gap around a migration and runtime routing boundary, not a request to reintroduce openai-codex/* as the user-facing provider route.
Related work
PR #90328 proposes exposing configured model runtime metadata through models.list and the model picker so openai/gpt-5.5 can show OpenAI Codex when it is routed through the Codex runtime.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 4, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 7:43 AM ET / 11:43 UTC.
Summary
Keep open. Current main and v2026.6.9 still lack
agentRuntimemetadata onmodels.listmodel choices and WebUI picker labels, while the proof-positive implementation at #90328 remains open for maintainer protocol/product acceptance.Reproducibility: yes. for the source-level observability gap: current main lacks
agentRuntimeonModelChoice,models.listdoes not decorate rows with runtime metadata, and the WebUI picker label path has no runtime suffix. I did not replay the original Telegram upgrade scenario.Root-cause cluster
Relationship:
canonicalCanonical: #90420
Summary: This issue is the specific 2026.6.1 OpenAI/Codex migration observability report; the open PR is the implementation candidate, while older/broader reports and overlapping runtime-label PRs do not replace it before the canonical PR lands.
Members:
fixed_by_candidate: Expose model picker agent runtimes #90328 - The PR explicitly refs this issue and adds the requested optionalmodels.listruntime metadata plus WebUI picker display behavior.partial_overlap: Model picker should distinguish GPT provider/auth route from agent runtime #84032 - The older issue covers broader model picker provider/auth/runtime ambiguity and points to the same PR, but this issue adds the 2026.6.1 migration and stale-session evidence.adjacent_distinct: Session model route drifts from openai/gpt-5.5 to openai-codex/gpt-5.5 with native Codex runtime #90036 - That closed issue covered session route drift back toopenai-codex/*; it made this observability gap visible but is a distinct state-drift bug.adjacent_distinct: Codex migration (2026.6.1) drops the gpt-5.5 model when a canonicalopenaiprovider exists for embeddings — agents go silent #90047 - That closed issue covered migration model loss when canonical OpenAI providers already existed, not the remaining model-list/runtime display metadata gap.adjacent_distinct: Bug: rewritePluginEntries silently drops openai-codex config when openai entry already present #93891 - That closed issue covered plugin-entry config data loss in doctor migration, related to the OpenAI Codex migration cluster but not the same model picker metadata problem.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
The same-author open PR already owns the implementation and needs maintainer protocol/product acceptance, so a competing automated fix PR should not be queued.
Review details
Best possible solution:
Review and land #90328, or an equivalent single canonical optional
ModelChoice.agentRuntimecontract, while preserving canonicalopenai/*model values.Do we have a high-confidence way to reproduce the issue?
Yes, for the source-level observability gap: current main lacks
agentRuntimeonModelChoice,models.listdoes not decorate rows with runtime metadata, and the WebUI picker label path has no runtime suffix. I did not replay the original Telegram upgrade scenario.Is this the best way to solve the issue?
Yes, conditionally: projecting the existing runtime resolver into optional model-choice display metadata preserves canonical
openai/*refs and avoids reintroducingopenai-codex/*. The remaining question is maintainer acceptance of the public protocol/display contract.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
ModelChoicefield and client display behavior, so maintainer protocol/product acceptance is still required before merge.Codex review notes: model internal, reasoning high; reviewed against d1cbe29f3d52.
Label changes
Label justifications:
P2: The issue affects real OpenAI/Codex route diagnosability after migration but is not an emergency crash, data-loss, or unusable-runtime report.impact:session-state: The motivating failure involved an existing Telegram direct session retaining staleopenai-codex/*route state after migration.impact:auth-provider: The report is about distinguishing canonical model choice, OpenAI/Codex auth route, and Codex runtime selection.Evidence reviewed
What I checked:
AGENTS.md:16, d1cbe29f3d52)ModelChoiceSchemaexposesid,name,provider,alias,available,contextWindow, andreasoning, but noagentRuntimefield formodels.listrows. (packages/gateway-protocol/src/schema/agents-models-skills.ts:15, d1cbe29f3d52)buildPublicModelsListEntrystrips runtime params and returns catalog metadata plus availability; it does not call the existing runtime metadata resolver or attach display runtime data. (src/gateway/server-methods/models-list-result.ts:207, d1cbe29f3d52)buildCatalogDisplayLookupdisambiguates by name/provider/raw label only, so a canonicalopenai/gpt-5.5Codex route can still display like a plain OpenAI model. (ui/src/ui/chat-model-ref.ts:187, d1cbe29f3d52)resolveModelAgentRuntimeMetadataalready derives runtime id/source from provider/model policy and session overlays, making the remaining gap themodels.list/picker projection contract. (src/agents/agent-runtime-metadata.ts:8, d1cbe29f3d52)models.listruntime output: Current docs say provider/model runtime policy belongs on model/provider config and OpenAI official models select Codex by default, while themodels.listprotocol section only documents view selection. Public docs:docs/gateway/config-agents.md. (docs/gateway/config-agents.md:467, d1cbe29f3d52)Likely related people:
models.listruntime metadata and WebUI picker runtime label behavior. (role: linked implementation author; confidence: high; commits: bc62b391bf7f; files:packages/gateway-protocol/src/schema/agents-models-skills.ts,src/gateway/server-methods/models-list-result.ts,src/gateway/server-methods/models-list-runtime-metadata.ts)models-list-result.tswork around Codex model visibility and model availability, adjacent to the missing metadata projection. (role: gateway model-list contributor; confidence: high; commits: afa04d6454f5, 85343ea54608, 21512a696ff1; files:src/gateway/server-methods/models-list-result.ts)src/agents/agent-runtime-metadata.ts,src/agents/harness/policy.ts)src/agents/openai-routing.ts,docs/gateway/config-agents.md,src/agents/agent-runtime-metadata.ts)ui/src/ui/chat-model-ref.ts,ui/src/ui/chat-model-ref.test.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.ooiuuii commentedon Jun 14, 2026
@clawsweeper re-review
Retrying because the previous issue review failed with a retryable Codex transport failure before it could establish a reproduction path. The related fix PR #90328 now explicitly refs this issue and has current proof/status labels (
proof: sufficient,rating: 🐚 platinum hermit,status: 👀 ready for maintainer look). Please re-evaluate the issue for appropriate triage labels against that updated context.clawsweeper commentedon Jun 14, 2026
🦞🧹
ClawSweeper re-review requested.
I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow
sweep.yml, eventrepository_dispatch).Result: the existing ClawSweeper review comment will be edited in place when the review finishes.
Re-review progress:
refactor(codex)!: fold the codex text provider into openai with a doc…
refactor(codex)!: fold the codex text provider into openai with a doc…
refactor(codex)!: fold the codex text provider into openai with a doc…