Skip to content

Commit d004985

Browse files
committed
Omit Codex Responses reasoning.summary auto
ChatGPT Codex rejects summary "auto" for the gpt-5.6-terra / gpt-5.3-codex family (HTTP 400). Send effort only to match the Codex CLI catalog default_reasoning_summary=none.
1 parent bebe563 commit d004985

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ matching `## [X.Y.Z]` section (plus install instructions). Do not maintain
1111
parallel copies under `docs/` or `scripts/notes/`. At cut time: rename
1212
`## [Unreleased]` to `## [X.Y.Z] - YYYY-MM-DD`, then run the release script.
1313

14+
## [Unreleased]
15+
16+
### Fixed
17+
18+
- **Codex Responses no longer sends `reasoning.summary: "auto"`.** ChatGPT
19+
Codex rejects that value for gpt-5.6-terra / gpt-5.3-codex family models
20+
(HTTP 400 at turn 0). The adapter now sends `{ effort }` only, matching
21+
Codex CLI catalog `default_reasoning_summary=none` (CL-6893).
22+
1423
## [0.2.103] - 2026-08-23
1524

1625
### TUI

‎src/provider/codex-responses-adapter.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,12 @@ function buildRequest(
297297
}
298298
// reasoning_effort rides in providerOptions (same place the OpenAI-compatible
299299
// path reads it); map it onto the Responses `reasoning.effort` field.
300+
// ChatGPT Codex rejects summary:"auto" for gpt-5.6-terra / gpt-5.3-codex
301+
// family (HTTP 400; supported: concise | detailed | none). Codex CLI catalog
302+
// default_reasoning_summary is none — send effort only (CL-6893).
300303
const effort = options.providerOptions?.["reasoning_effort"];
301304
if (typeof effort === "string" && effort !== "none") {
302-
body["reasoning"] = { effort, summary: "auto" };
305+
body["reasoning"] = { effort };
303306
}
304307
if (sessionId !== undefined) body["prompt_cache_key"] = sessionId;
305308

‎tests/unit/codex-responses-adapter.test.ts‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,27 @@ describe("codex-responses buildRequest", () => {
103103
test("maps reasoning_effort to the Responses reasoning config", () => {
104104
const options: InferenceOptions = { providerOptions: { ...baseOptions.providerOptions, reasoning_effort: "high" } };
105105
const body = JSON.parse(adapter().buildRequest([userTurn("x")], "gpt-5-codex", options).body) as Record<string, unknown>;
106-
expect(body["reasoning"]).toEqual({ effort: "high", summary: "auto" });
106+
expect(body["reasoning"]).toEqual({ effort: "high" });
107107
});
108108

109+
// CL-6893: ChatGPT Codex rejects reasoning.summary "auto" for the gpt-5.6-terra /
110+
// gpt-5.3-codex family (HTTP 400). Codex CLI catalog default is none — omit summary
111+
// (effort only) so Terra/Luna request bodies never send summary:"auto".
112+
test.each(["gpt-5.6-terra", "gpt-5.6-luna"] as const)(
113+
"omits reasoning.summary auto for %s (CL-6893)",
114+
(model) => {
115+
const options: InferenceOptions = {
116+
providerOptions: { ...baseOptions.providerOptions, reasoning_effort: "high" },
117+
};
118+
const body = JSON.parse(adapter().buildRequest([userTurn("x")], model, options).body) as Record<
119+
string,
120+
unknown
121+
>;
122+
expect(body["reasoning"]).toEqual({ effort: "high" });
123+
expect(body["reasoning"]).not.toHaveProperty("summary");
124+
},
125+
);
126+
109127
test("roundtrips encrypted reasoning signature from prior assistant turn into Responses reasoning item", () => {
110128
// Prior turn's assistant content included a thinking block with signature.
111129
// buildRequest must emit the "reasoning" item (with encrypted_content) before

0 commit comments

Comments
 (0)