#22441: fix: force store for openai-responses providers
agents
size: XS
Cluster:
Model Input and Streaming Fixes
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_comment -->
<h3>Greptile Summary</h3>
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)
<h3>Confidence Score: 4/5</h3>
- 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
<sub>Last reviewed commit: f3e1ad3</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#16930: fix: treat empty baseUrl as non-direct for OpenAI Responses
by OiPunk · 2026-02-15
81.6%
#15197: fix: allow OpenAI auth profiles for OpenAI-compatible providers
by bufordtjustice2918 · 2026-02-13
74.8%
#18002: fix: add Azure AI Foundry URL support for custom providers
by MisterGuy420 · 2026-02-16
72.2%
#4534: fix: packaging and OpenAI vision format conversion
by SalimBinYousuf1 · 2026-01-30
71.2%
#2353: fix: ensure api field is set for inline provider models
by sbknana · 2026-01-26
70.4%
#4057: fix: sanitize tool call IDs for Azure OpenAI
by wangchuan3533 · 2026-01-29
70.2%
#6673: fix: preserve allowAny flag in createModelSelectionState for custom...
by tenor0 · 2026-02-01
69.8%
#12059: feat(agents): Add Azure AI Foundry credential support
by lisanyambere · 2026-02-08
69.7%
#11782: fix: resolve 403 auth error for GithubCopilot imageModel (#10277)
by adamkoncz · 2026-02-08
69.7%
#7819: Fix: clamp OpenAI Responses function_call item IDs
by LeLe1110 · 2026-02-03
69.6%