Keep OpenAI Codex migrations on automatic runtime routing#79238
Conversation
636438c to
71fff29
Compare
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Current-main source shows doctor can create whole-agent Codex pins and execution can reuse session pins, while #79279 provides 2026.5.7 MiniMax/Anthropic provider-not-found logs. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this branch after maintainer contract review and exact-head CI remain green, then resolve the linked mixed-provider Codex routing bug as implemented. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows doctor can create whole-agent Codex pins and execution can reuse session pins, while #79279 provides 2026.5.7 MiniMax/Anthropic provider-not-found logs. Is this the best way to solve the issue? Yes, pending maintainer approval. Provider/model-scoped runtime policy is the maintainable direction here, and What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b01889c00d05. |
71fff29 to
76e5103
Compare
76e5103 to
2633720
Compare
d3a1422 to
c2ffafc
Compare
c2ffafc to
9feb331
Compare
|
The P2 finding was valid and is fixed in fe2dd61.
Validation after the fix:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…9238) * fix: keep migrated openai codex routes automatic * scope runtime policy to providers and models * fix runtime policy surfaces * fix ci runtime policy checks * fix doctor stale session runtime pins
…9238) * fix: keep migrated openai codex routes automatic * scope runtime policy to providers and models * fix runtime policy surfaces * fix ci runtime policy checks * fix doctor stale session runtime pins
…9238) * fix: keep migrated openai codex routes automatic * scope runtime policy to providers and models * fix runtime policy surfaces * fix ci runtime policy checks * fix doctor stale session runtime pins
…9238) * fix: keep migrated openai codex routes automatic * scope runtime policy to providers and models * fix runtime policy surfaces * fix ci runtime policy checks * fix doctor stale session runtime pins
…9238) * fix: keep migrated openai codex routes automatic * scope runtime policy to providers and models * fix runtime policy surfaces * fix ci runtime policy checks * fix doctor stale session runtime pins
…9238) * fix: keep migrated openai codex routes automatic * scope runtime policy to providers and models * fix runtime policy surfaces * fix ci runtime policy checks * fix doctor stale session runtime pins
Legacy
openai-codex/*repair had two jobs: move users to canonicalopenai/*model refs, and keep their Codex subscription auth path working. It accidentally made runtime selection too broad by writing whole-agent and session-level Codex pins.That made mixed-provider agents brittle. OpenAI turns already choose the Codex harness automatically, so pinning the whole agent to Codex meant later MiniMax, Anthropic, or other non-OpenAI model switches could be sent through the Codex app-server and fail with provider-not-found errors.
This keeps the migration narrower. OpenAI agent turns stay on Codex by default, but runtime policy is now provider/model scoped. Legacy whole-agent runtime config,
OPENCLAW_AGENT_RUNTIME, and stale session harness/runtime pins are ignored by live routing and cleaned by doctor. Explicit provider/model PI still works for OpenAI, including theopenai-codexOAuth compatibility route through PI's legacy Codex-auth transport. Legacy CLI/runtime model refs are migrated to canonical provider/model refs with model-scoped runtime policy when that intent still needs to be preserved.Real behavior proof
openclaw doctor --fixshould migrateopenai-codex/*to canonicalopenai/*without adding a whole-agentagentRuntime.id: "codex"pin that breaks mixed-provider agents.OPENCLAW_CONFIG_PATH,OPENCLAW_HOME, andOPENCLAW_STATE_DIRso the run used a real config file without touching my normal gateway state.agents.defaults.model = "openai-codex/gpt-5.5", then ranpnpm openclaw doctor --fix --non-interactivewithOPENCLAW_CONFIG_PATHpointed at that temp config.{ "exitCode": 0, "model": "openai/gpt-5.5", "agentRuntime": null, "doctorMentionedCanonicalRoute": true }openai/gpt-5.5, printed the canonical route repair, and leftagents.defaults.agentRuntimeabsent instead of pinning Codex.