Skip to content

fix(codex): send client identity headers for GPT-5.6 - #2647

Merged
benfrank241 merged 1 commit into
vectorize-io:mainfrom
JiehoonKwak:agent/codex-gpt56-oauth-headers
Jul 10, 2026
Merged

benfrank241 merged 1 commit into
vectorize-io:mainfrom
JiehoonKwak:agent/codex-gpt56-oauth-headers

Conversation

@JiehoonKwak

@JiehoonKwak JiehoonKwak commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • send Codex client identity headers through one shared request-header helper
  • cover normal, strict structured-output, tool-call, and OAuth-refresh paths
  • document explicit gpt-5.6-luna selection without changing the default model

The production change is confined to codex_llm.py. The remaining files add regression coverage and update one documentation example plus its generated mirror.

Fixes #2643.

Testing

  • focused Codex suite: 46 passed
  • npm run build --workspace=hindsight-docs
  • isolated Codex OAuth: Sol, Terra, Luna, and gpt-5.4-mini passed plain text, strict structured output, and tool calling

Full local suite: 3,795 passed; 7 failures and 7 errors require unavailable external credentials/services or test fixtures and are unrelated to this patch.

@JiehoonKwak JiehoonKwak changed the title Fix Codex OAuth request identity for GPT-5.6 fix(codex): send client identity headers for GPT-5.6 Jul 10, 2026
@JiehoonKwak
JiehoonKwak marked this pull request as ready for review July 10, 2026 05:07

@benfrank241 benfrank241 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm — reproduced the root cause: on main the codex provider sends a browser User-Agent: Mozilla/5.0… and no originator header, so newer models gated on the first-party client identity (luna) 404. running these header tests against pristine main fails with KeyError: 'originator'; on this branch they pass with originator: codex_cli_rs + codex_cli_rs/0.0.0 (Hindsight).

nice touches: DRY'd the duplicated header dicts into _build_request_headers(), and the UA is honest — neutral 0.0.0 + (Hindsight) rather than impersonating a real codex release. tests cover call, call_with_tools, and identity persistence across an oauth refresh; docs + skill mirror updated in sync. 27 pass locally.

approving + kicked off CI.

@benfrank241
benfrank241 merged commit c6a1b50 into vectorize-io:main Jul 10, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex provider cannot use gpt-5.6-luna model

2 participants