default to store false for openai use with agent
Merged
TK
8mo ago+17+17+01234567890123456789-14-14-01234567890123456789
Why
OpenAI organizations with Zero Data Retention (ZDR) rejects stored responses from the Responses API (store: true is the default when the AI SDK auto selects it). This causes agent runs to fail
What Changed
- Set
openai: { store: false }inproviderOptionsacrossgenerateText/streamTextcalls:v3AgentHandler.ts(execute + stream),handleDoneToolCall.ts, - Simplified the existing Gemini
providerOptions— removed the conditionalmodelId.includes("gemini-3")check and always passgoogle: { mediaResolution: "MEDIA_RESOLUTION_HIGH" }since non-Google providers ignore it.
Test Plan
- Run agent in mode with an OpenAI model to confirm no breaking changes
Summary by cubic
Defaulted agent calls to OpenAI to not store responses, preventing failures for Zero Data Retention orgs. Also simplified Gemini options by always sending high media resolution.
-
Bug Fixes
- Set
providerOptions.openai.storetofalsefor agentgenerateTextandstreamTextcalls inv3AgentHandler(execute + stream) andhandleDoneToolCall, avoiding Responses API rejections in ZDR orgs.
- Set
-
Refactors
- Always pass
google: { mediaResolution: "MEDIA_RESOLUTION_HIGH" }inproviderOptions; non-Google providers ignore it. Added a changeset for a patch release of@browserbasehq/stagehand.
- Always pass