fix(provider-codex): sanitize Responses message ids before dispatch#97
fix(provider-codex): sanitize Responses message ids before dispatch#97M1k0t0 wants to merge 2 commits into
Conversation
|
But, how does it work on Codex official client+server? |
7b421ae to
3eb01f3
Compare
|
I dug into this more. The relevant official Codex behavior has two paths. For normal Codex Responses requests, the client strips item ids when the However, when Codex thinks it is connected to an Azure Responses endpoint, for example because the base URL contains Floway then forwards to the Codex upstream, where those local ids are not valid Codex message ids. This patch handles that compatibility boundary: preserve upstream-shaped message ids ( This PR is still draft for a separate reason: for stored native Responses requests, Floway’s gateway can currently fail while staging typeless Refs:
|
Summary
msg*message ids and leave non-message item ids untouchedWhy
Codex can echo local/review rollout message ids that the upstream Responses API rejects. Those ids are client-local, not upstream-owned, so Floway should remove them before sending the request to Codex upstream while preserving the message content.
This PR is scoped to the Codex provider wire boundary. A separate gateway-side normalization fix is still needed for stored native Responses requests where typeless
{ role, content }messages are staged before provider interceptors run.Reproduction
/reviewand wait for the review to complete.