fix(codex): restore Version header and single-source the CLI version
The image handler's `version` header was commented out, so Codex image requests reached chatgpt.com without the Version identity the backend expects. Restore it and route every Codex identity header through one constant. The CLI version now lives on registry codex.transport as `cliVersion` (the same pattern gemini-cli uses) and is re-exported as CODEX_CLI_VERSION, so the registry User-Agent, the image handler and the connection test can no longer drift apart. Bumped 0.136.0 -> 0.154.0 (current stable). Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -192,9 +192,10 @@
|
||||
"baseUrl": "https://chatgpt.com/backend-api/codex/responses",
|
||||
"format": "openai-responses",
|
||||
"forceStream": true,
|
||||
"cliVersion": "0.154.0",
|
||||
"headers": {
|
||||
"originator": "codex_cli_rs",
|
||||
"User-Agent": "codex_cli_rs/0.136.0"
|
||||
"User-Agent": "codex_cli_rs/0.154.0"
|
||||
},
|
||||
"usage": {
|
||||
"url": "https://chatgpt.com/backend-api/wham/usage",
|
||||
|
||||
@@ -351,7 +351,7 @@ describe("handleImageGenerationCore", () => {
|
||||
headers: expect.objectContaining({
|
||||
authorization: "Bearer codex-token",
|
||||
"chatgpt-account-id": "account-123",
|
||||
version: "0.136.0",
|
||||
version: "0.154.0",
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user