-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Custom OpenAI Responses-compatible providers still replay item ids when store support is stripped #89728
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
Current
mainstill replays prior Responses item ids for a custom OpenAI Responses-compatible provider that does not support Responsesstore.The previously referenced fix commit,
03dec8bb3a00209780d3140ec3f10ad0eb069030, is included in currentmain, but it does not cover this storeless compatibility path.Related prior report:
Current main checked
main:ed4c4afc0f6e6ce455bafcd3a2d4857fd1ebc77803dec8...main:03dec8bb3a00209780d3140ec3f10ad0eb069030is the merge base andmainis ahead, so the earlier fix is present in currentmain.Affected path
This affects custom OpenAI Responses-compatible providers where the model configuration explicitly strips/does not support store, for example:
In this path, the payload policy resolves to:
explicitStore === undefinedshouldStripStore === trueHowever, current
mainstill uses:Because
undefined !== falseistrue, prior Responses item ids can still be replayed for a storeless request.Deterministic reproduction
A source-level reproduction calls
buildOpenAIResponsesParamswith:api: "openai-responses"provider: "custom-openai-responses"baseUrl: "https://custom.example.com/v1"compat: { supportsStore: false, supportsPromptCacheKey: false }reasoning,message, andfunction_callitem idsActual behavior on current
mainmain@ed4c4afc0f6e6ce455bafcd3a2d4857fd1ebc778still replays previous Responses item ids:{ "sourceLabel": "latest upstream main", "sourceSha": "ed4c4afc0f6e6ce455bafcd3a2d4857fd1ebc778", "provider": "custom-openai-responses", "baseUrl": "https://custom.example.com/v1", "store": null, "hasAnyPriorReplayId": true, "safeForStorelessReplay": false, "replayedIds": [ { "type": "message", "id": null, "call_id": null }, { "type": "reasoning", "id": "rs_prior", "call_id": null }, { "type": "message", "id": "msg_prior", "call_id": null }, { "type": "function_call", "id": "fc_prior", "call_id": "call_abc" }, { "type": "message", "id": null, "call_id": null } ] }Expected behavior
When Responses store is stripped or unsupported, previous Responses item ids should not be replayed. The stateless request may keep content needed for replay, but the stale store-backed ids should be omitted.
The updated fix branch produces:
{ "sourceLabel": "updated fix branch", "sourceSha": "ce91ed58658c11c875055ee252c7e6f755cc7cba", "provider": "custom-openai-responses", "baseUrl": "https://custom.example.com/v1", "store": null, "hasAnyPriorReplayId": false, "safeForStorelessReplay": true, "replayedIds": [ { "type": "message", "id": null, "call_id": null }, { "type": "reasoning", "id": null, "call_id": null }, { "type": "message", "id": null, "call_id": null }, { "type": "function_call", "id": null, "call_id": "call_abc" }, { "type": "message", "id": null, "call_id": null } ] }Why #89330 /
03dec8did not cover this case03dec8covers cases whereexplicitStoreisfalse, but this custom Responses-compatible path has:So the current guard still permits replay:
The missing condition is to also gate replay when
shouldStripStoreis true.Suggested fix direction
Gate replay ids on
shouldStripStoreas well, for example:And ensure the wrapper path passes
replayResponsesItemIds: falsewhen the payload policy strips store support.Validation notes
The updated branch was rebased/merged onto latest upstream
mainand verified with a source-level reproduction. Focused Vitest runs were attempted locally, but the current environment SIGKILLed during test bundling after dependency setup; the deterministic source-level reproduction above is the direct evidence for the regression path.