Repository navigation
fix(codex): restore GPT-5.6 reasoning effort options - #126182
Conversation
Keep public model identities separate from app-server execution routing, and retain provider-owned complete effort metadata when account discovery is partial. Fixes #126005
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready at exact head Local final-head proof:
Hosted proof: CI 32217883046 and Workflow Sanity 32217883304 both passed on the exact head. The real Codex app-server |
|
Merged via squash.
|
* fix(codex): preserve model effort capabilities Keep public model identities separate from app-server execution routing, and retain provider-owned complete effort metadata when account discovery is partial. Fixes openclaw#126005 * refactor(codex): avoid redundant thread rotation * fix(codex): preserve model fallbacks without leaking wire ids
Closes #126005
What Problem This Solves
Fixes an issue where users running GPT-5.6 through the native Codex runtime could see only High in the chat effort control when account-scoped model discovery returned an incomplete capability row.
The regression also affected
models.list,sessions.list,/thinkvalidation, andsessions.patch, so the missing options could not be repaired safely in the Control UI alone.Why This Change Was Made
Codex
model/listhas two distinct identities: a stable public model ID and the execution model used in app-server requests. OpenClaw collapsed them into one catalog key, then let account-scoped compatibility metadata overwrite the provider-owned capability profile.This change keeps the stable ID as the public catalog/session identity, carries the execution identity only as private prepared runtime metadata, and merges account inventory with provider-owned complete reasoning capabilities. Explicit empty observations remain authoritative, while partial non-empty observations can no longer erase known effort levels. Normal turns, side questions, and bounded turns all use the execution identity for Codex requests without exposing it in transcript attribution, lifecycle events, model status, or public Gateway projections.
The upstream contract was verified directly in Codex:
Modelexposes distinctidandmodelfields, and the app-server projects both from the selected preset inmodels.rs.Provenance: #124829 introduced the account-scoped harness catalog adapter (code/PR author @hannesrudolph; squash merged by @steipete on 2026-08-18). That reopened the partial-capability regression previously repaired in #121865.
AI-assisted: yes; the implementation and proof were reviewed and understood before submission.
Production LOC: +92/-29 (net +63) | Tests: +154/-17 (net +137). The production growth establishes one explicit logical/execution identity boundary and applies it across the invariant-sharing Codex request paths; the first implementation was reduced by deleting a redundant thread-rotation path and 121 lines before submission.
User Impact
GPT-5.6 users get the complete supported effort range instead of a picker that stops at High. Existing sessions keep their stable public model identity, supported effort values validate consistently across UI and Gateway surfaces, and private app-server routing identities remain private.
Evidence
A live Codex app-server
model/listprobe on this host advertised the complete six native GPT-5.6 efforts. The repaired catalog preserved the stable public ID and projected:low, medium, high, xhigh, max, ultraThe deterministic Control UI browser flow reproduces the damaged input and the repaired profile:
Browser assertions verified the slider changed from 2 stops (
off,high) to 7 ordered stops (off,low,medium,high,xhigh,max,ultra). Both screenshots were inspected after capture.Focused and owner-boundary proof:
node scripts/check-changed.mjs: passed after a singlepnpm installrefresh repaired an unrelated transient Reef workspace-module resolution failure.pnpm build: passed on the final branch.git diff --check: passed.The original signed-in team dashboard was not re-driven because the local Chrome extension relay was unavailable. The changed producer was live-tested through the real Codex app-server catalog, and the shipped Control UI was exercised in a real Chromium flow with deterministic Gateway data.