feat(codex): send version header so backend serves newer models (gpt-5.6-luna)#41
Open
skulidropek wants to merge 5 commits into
Open
feat(codex): send version header so backend serves newer models (gpt-5.6-luna)#41skulidropek wants to merge 5 commits into
skulidropek wants to merge 5 commits into
Conversation
The ChatGPT Codex backend gates newer models (e.g. gpt-5.6-luna) behind a recent client version advertised via the `version` HTTP header. Without it POST /responses returns 404 `Model not found`; with `version: 0.144.1` it returns 200. Mirror the Codex CLI so newer models are usable through the router; overridable via CODEX_CLIENT_VERSION. Adds a unit test and changelog fragment.
…c_markdown The Lint and Format Check job runs `cargo clippy --all-targets --all-features` with `-D warnings`, which fails on two doc comments in subscription_proxy.rs that referenced `ChatGPT` and `OpenClaw` without backticks (clippy::doc_markdown). Wrap them in backticks to match the rest of the file. No functional change. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The Build Package job runs `cargo build --release` then `cargo package --list`.
Cargo.toml was bumped to 0.20.0 but Cargo.lock's own package entry still recorded
0.19.0, so every build rewrote Cargo.lock, leaving the working tree dirty and
`cargo package --list` aborting ("files ... not yet committed into git: Cargo.lock").
Sync the lockfile's self-version so the tree stays clean. No dependency changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
For Codex (ChatGPT) subscriptions the router forwards
POST /v1/responsestohttps://chatgpt.com/backend-api/codex/responses, preserving the caller'smodelverbatim.The ChatGPT Codex backend gates newer models behind a recent client version, advertised via
a
versionHTTP header (the Codex CLI sendsversion: <cli-version>). The router setschatgpt-account-id,openai-betaandoriginator, but notversion.As a result, newer models are rejected even though the account has access:
Verified end-to-end: the same ChatGPT account that returns
Model not foundthrough the routerserves the model fine via the Codex CLI (which sends the
versionheader), and adding the headerto the router's request makes
gpt-5.6-lunawork whilegpt-5.4/gpt-5.5keep working.Change
Send a
versionheader on Codex requests, defaulting to0.144.1and overridable viaCODEX_CLIENT_VERSION, mirroring the Codex CLI. Adds a unit test (codex_headers_include_version)and a changelog fragment.
Notes
The router remains a transparent proxy — this only advertises a client version so the backend
exposes the models the account is entitled to. Model availability is still governed by the account.