Files
OmniRoute/changelog.d/fixes/6932-codex-assistant-input-text-normalization.md
Saren d2d4cf0e17 fix(sse): normalize assistant input_text to output_text in Codex Responses input (#6932)
codex-cli replays assistant history with content parts typed as
`input_text`, but the Responses API only accepts `output_text`
(or `refusal`) on assistant turns — `input_text` is user-only.
`normalizeCodexMessageContentPart` previously only rewrote parts
literally typed `text`, leaving explicit `input_text` on assistant
turns untouched, which the Codex/OpenAI backend rejects with a 400.

Rewrite explicit `input_text` (and `text`) to `output_text` on
assistant-role parts, dropping the assistant-only `annotations`,
`logprobs`, and `obfuscation` fields. Mode-agnostic, applies to
all Codex models.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-07-12 10:47:51 -03:00

302 B

  • fix(sse): normalizeCodexMessageContentPart now rewrites explicit type: "input_text" (not just type: "text") to output_text on assistant-role Codex Responses input parts, so replayed assistant history sent by codex-cli as input_text is no longer rejected by the Codex/OpenAI backend (#6932)