Skip to content

Commit 9f3adcf

Browse files
Merge branch 'main' into cl-6899-stream-primary-mid-turn-assistant-text-and-live-chain-of
Amp-Thread-ID: https://ampcode.com/threads/T-01a02c68-0d8d-777b-b717-81fb9a282023 Co-authored-by: Amp <amp@ampcode.com>
2 parents 7c47a81 + ada29e3 commit 9f3adcf

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ parallel copies under `docs/` or `scripts/notes/`. At cut time: rename
2323
unchanged. Assistant mid-turn text continues to grow the open streaming
2424
assistant row from `inference.text.delta`.
2525

26+
### Fixed
27+
28+
- **Codex Responses no longer sends `reasoning.summary: "auto"`.** ChatGPT
29+
Codex rejects that value for gpt-5.6-terra / gpt-5.3-codex family models
30+
(HTTP 400 at turn 0). The adapter now sends `{ effort }` only, matching
31+
Codex CLI catalog `default_reasoning_summary=none` (CL-6893).
32+
2633
## [0.2.103] - 2026-08-23
2734

2835
### TUI

src/provider/codex-responses-adapter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,12 @@ function buildRequest(
321321
}
322322
// reasoning_effort rides in providerOptions (same place the OpenAI-compatible
323323
// path reads it); map it onto the Responses `reasoning.effort` field.
324+
// ChatGPT Codex rejects summary:"auto" for gpt-5.6-terra / gpt-5.3-codex
325+
// family (HTTP 400; supported: concise | detailed | none). Codex CLI catalog
326+
// default_reasoning_summary is none — send effort only (CL-6893).
324327
const effort = options.providerOptions?.["reasoning_effort"];
325328
if (typeof effort === "string" && effort !== "none") {
326-
body["reasoning"] = { effort, summary: "auto" };
329+
body["reasoning"] = { effort };
327330
}
328331
if (sessionId !== undefined) body["prompt_cache_key"] = sessionId;
329332

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,26 @@ describe("codex-responses buildRequest", () => {
132132
const body = JSON.parse(
133133
adapter().buildRequest([userTurn("x")], "gpt-5-codex", options).body,
134134
) as Record<string, unknown>;
135-
expect(body["reasoning"]).toEqual({ effort: "high", summary: "auto" });
135+
expect(body["reasoning"]).toEqual({ effort: "high" });
136136
});
137137

138+
// CL-6893: ChatGPT Codex rejects reasoning.summary "auto" for the gpt-5.6-terra /
139+
// gpt-5.3-codex family (HTTP 400). Codex CLI catalog default is none — omit summary
140+
// (effort only) so Terra/Luna request bodies never send summary:"auto".
141+
test.each(["gpt-5.6-terra", "gpt-5.6-luna"] as const)(
142+
"omits reasoning.summary auto for %s (CL-6893)",
143+
(model) => {
144+
const options: InferenceOptions = {
145+
providerOptions: { ...baseOptions.providerOptions, reasoning_effort: "high" },
146+
};
147+
const body = JSON.parse(
148+
adapter().buildRequest([userTurn("x")], model, options).body,
149+
) as Record<string, unknown>;
150+
expect(body["reasoning"]).toEqual({ effort: "high" });
151+
expect(body["reasoning"]).not.toHaveProperty("summary");
152+
},
153+
);
154+
138155
test("roundtrips encrypted reasoning signature from prior assistant turn into Responses reasoning item", () => {
139156
// Prior turn's assistant content included a thinking block with signature.
140157
// buildRequest must emit the "reasoning" item (with encrypted_content) before

0 commit comments

Comments
 (0)