You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(codex): respect non-Claude model selection and OAuth, fix demo summary (#2075)
Three defects reported in #2075 made the Codex adapter unusable with a
ChatGPT OAuth login.
1. Model routing handed Claude tier names to Codex. The batch/heuristic
selector emits opus/sonnet/haiku with no adapter awareness, so a
high-stakes role (manager/architect/security) produced `codex exec -m
opus`, which Codex rejects. The spawner now substitutes the adapter's
default model for an unpinned Claude tier name when the run-level adapter
is non-Claude, so the model recorded for the run matches what actually
runs. The Claude path is unchanged. CodexAdapter also maps any residual
tier name to its default as a last-resort net.
2. Spurious OPENAI_API_KEY warning. The adapter warned on every spawn when
the env var was absent, even with a valid ChatGPT OAuth session. It now
detects ~/.codex/auth.json (written by `codex login`) and only warns when
neither an API key nor an OAuth session is present.
3. `bernstein demo --real` crash. _print_demo_summary read the /status
`tasks` field as a list, but the endpoint returns {"count", "items"}.
Iterating the dict yielded its string keys and raised AttributeError on
`.get`. It now unwraps the items list and keeps only dict rows.
Fixes#2075
0 commit comments