Files
OmniRoute/changelog.d/features/6820-codex-effort-model-echo.md
Diego Rodrigues de Sa e Souza 1045e57aa1 feat(codex): echo requested effort-suffixed model id in Responses payloads (#3697) (#6820)
* feat(codex): echo requested effort-suffixed model id in Responses payloads (#3697)

Codex CLI compatibility shim: the Responses API response.created/
response.in_progress/response.completed payloads now carry a `model`
field (previously absent), and for Codex-CLI-originated requests it
echoes the client-requested effort-suffixed model id (e.g.
gpt-5.5-xhigh) instead of the bare upstream id (gpt-5.5), so the Codex
CLI status line/model button shows the active reasoning effort.

- openai-responses.ts translator threads the upstream model into the
  Responses event objects (additive, omitted when unknown).
- New isCodexOriginatedHeaders() (codexIdentity.ts) reuses PR #3481's
  originator/User-Agent detection, header-based so it still fires when
  a combo routes codex/gpt-5.5-xhigh to a non-codex upstream.
- chatCore's existing opt-in #1311 echoModel pipeline now also fires
  automatically for Codex clients on the Responses API, regardless of
  the echoRequestedModelName setting.
- responseModelEcho.ts now also rewrites the nested response.model
  field the Responses API uses (previously only top-level model).
- /v1/models keeps returning models: [] for Codex (unchanged, #3481).

Regression guard: tests/unit/codex-effort-model-echo-3697.test.ts.

Closes #3697

* chore(merge): re-sync with release/v3.8.47 (restore CHANGELOG, keep own bullet)

* chore(merge): re-sync with release/v3.8.47; move changelog bullet to changelog.d fragment (merge-storm proof)
2026-07-11 07:39:09 -03:00

1.3 KiB

  • feat(codex): Codex CLI compatibility shim — the Responses API response.created/response.in_progress/response.completed payloads now carry a model field (previously absent), and for Codex-CLI-originated requests it echoes the client-requested, effort-suffixed model id (e.g. gpt-5.5-xhigh) instead of the bare upstream id (gpt-5.5), so the Codex CLI status line/model button shows the active reasoning effort (#3697). openaiToOpenAIResponsesResponse (open-sse/translator/response/openai-responses.ts) now threads the upstream model into the Responses event objects; a new isCodexOriginatedHeaders() (open-sse/config/codexIdentity.ts, reusing PR #3481's originator/User-Agent detection) makes chatCore's existing opt-in echoRequestedModelName (#1311) model-echo pipeline fire automatically for Codex clients regardless of the setting, detected by request headers so it still applies when codex/gpt-5.5-xhigh is routed through a combo to a non-codex upstream; echoModelInObject/echoModelInSseLine (open-sse/services/responseModelEcho.ts) now also rewrite the nested response.model field the Responses API uses. /v1/models still returns models: [] for Codex (unchanged). Regression guard: tests/unit/codex-effort-model-echo-3697.test.ts.