Skip to content

fix: force store for openai-responses providers#22441

Closed
EdwardWu7 wants to merge 1 commit intoopenclaw:mainfrom
EdwardWu7:fix/responses-store-all-providers
Closed

fix: force store for openai-responses providers#22441
EdwardWu7 wants to merge 1 commit intoopenclaw:mainfrom
EdwardWu7:fix/responses-store-all-providers

Conversation

@EdwardWu7
Copy link
Copy Markdown
Contributor

@EdwardWu7 EdwardWu7 commented Feb 21, 2026

Fixes #21782

Summary

  • Force store: true for all openai-responses providers, not just direct OpenAI hosts.
  • Prevents previous_response_id failures on Azure/OpenAI-compatible endpoints when store defaults to false.

Notes

  • Responses API multi-turn requires persisted items; Azure returns 400 when store is false.

Greptile Summary

Simplifies shouldForceResponsesStore to force store=true for all openai-responses API providers, removing the previous restriction to direct OpenAI hosts. This prevents 400 errors on Azure and OpenAI-compatible endpoints that require persisted items for multi-turn conversations.

  • The existing test at src/agents/pi-embedded-runner-extraparams.e2e.test.ts:267-279 expects store=false for proxy URLs and will need to be updated
  • Comment on line 13 should be updated to reflect the new behavior (no longer limited to "direct" OpenAI)

Confidence Score: 4/5

  • This PR is safe to merge after updating the test and comment
  • The logic change is straightforward and addresses a real bug with Azure/compatible endpoints. However, there's a test that will break and a comment that needs updating, which are easy fixes but should be addressed before merging.
  • Check that the existing test at src/agents/pi-embedded-runner-extraparams.e2e.test.ts:267-279 is updated to match the new behavior

Last reviewed commit: f3e1ad3

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: XS labels Feb 21, 2026
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 21, 2026

Additional Comments (2)

src/agents/pi-embedded-runner/extra-params.ts
comment is outdated - it says "only force for direct OpenAI Responses" but the code now forces store for all openai-responses providers regardless of baseURL

// NOTE: Force `store=true` for all OpenAI Responses API providers (OpenAI, Azure, compatible endpoints).
// Codex responses (chatgpt.com/backend-api/codex/responses) require `store=false`.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/pi-embedded-runner/extra-params.ts
Line: 13-14

Comment:
comment is outdated - it says "only force for *direct* OpenAI Responses" but the code now forces store for all `openai-responses` providers regardless of baseURL

```suggestion
// NOTE: Force `store=true` for all OpenAI Responses API providers (OpenAI, Azure, compatible endpoints).
// Codex responses (chatgpt.com/backend-api/codex/responses) require `store=false`.
```

How can I resolve this? If you propose a fix, please make it concise.

src/agents/pi-embedded-runner/extra-params.ts
removing the provider and baseURL checks will break the existing test on line 267-279 of src/agents/pi-embedded-runner-extraparams.e2e.test.ts that expects store=false for non-OpenAI base URLs (proxies)

the test should be updated or removed to match the new behavior

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/pi-embedded-runner/extra-params.ts
Line: 128-140

Comment:
removing the provider and baseURL checks will break the existing test on line 267-279 of `src/agents/pi-embedded-runner-extraparams.e2e.test.ts` that expects `store=false` for non-OpenAI base URLs (proxies)

the test should be updated or removed to match the new behavior

How can I resolve this? If you propose a fix, please make it concise.

@steipete steipete self-assigned this Feb 27, 2026
steipete added a commit that referenced this pull request Feb 27, 2026
, #22441, #25088)

Landed from contributor PRs #16930, #22441, and #25088.

Co-authored-by: liweiguang <[email protected]>
Co-authored-by: EdwardWu7 <[email protected]>
Co-authored-by: MoerAI <[email protected]>
@steipete
Copy link
Copy Markdown
Contributor

Landed on main as 8da3a9a92d9c2c6db6fa6caa881e9310d1792e93.

Rewrite summary:

SHA notes:

  • Original PR commit: f3e1ad36870c9d1f9149745d604b34e68fe2e5f2
  • Landed commit: 8da3a9a92d9c2c6db6fa6caa881e9310d1792e93

Thanks @EdwardWu7.

@steipete steipete closed this Feb 27, 2026
execute008 pushed a commit to execute008/openclaw that referenced this pull request Feb 27, 2026
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
xiexikang pushed a commit to C-clawd/cclawd that referenced this pull request Feb 28, 2026
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <[email protected]>
Co-authored-by: EdwardWu7 <[email protected]>
Co-authored-by: MoerAI <[email protected]>
(cherry picked from commit c38be8f)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <[email protected]>
Co-authored-by: EdwardWu7 <[email protected]>
Co-authored-by: MoerAI <[email protected]>
(cherry picked from commit c38be8f)
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Feb 28, 2026
…nclaw#16930, openclaw#22441, openclaw#25088)

Landed from contributor PRs openclaw#16930, openclaw#22441, and openclaw#25088.

Co-authored-by: liweiguang <[email protected]>
Co-authored-by: EdwardWu7 <[email protected]>
Co-authored-by: MoerAI <[email protected]>
(cherry picked from commit c38be8f)
vincentkoc pushed a commit to Sid-Qin/openclaw that referenced this pull request Feb 28, 2026
vincentkoc pushed a commit to rylena/rylen-openclaw that referenced this pull request Feb 28, 2026
newtontech pushed a commit to newtontech/openclaw-fork that referenced this pull request Feb 28, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
wanjizheng pushed a commit to wanjizheng/openclaw that referenced this pull request Mar 1, 2026
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
safzanpirani pushed a commit to safzanpirani/clawdbot that referenced this pull request Mar 2, 2026
steipete added a commit to Sid-Qin/openclaw that referenced this pull request Mar 2, 2026
venjiang pushed a commit to venjiang/openclaw that referenced this pull request Mar 2, 2026
robertchang-ga pushed a commit to robertchang-ga/openclaw that referenced this pull request Mar 2, 2026
dorgonman pushed a commit to kanohorizonia/openclaw that referenced this pull request Mar 3, 2026
sachinkundu pushed a commit to sachinkundu/openclaw that referenced this pull request Mar 6, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure OpenAI Responses API: 'Item with id rs_... not found' when store is false

2 participants