Skip to content

Commit 1b13dad

Browse files
authored
Revert "fix: keep OpenAI reasoning responses stateful" (#4571)
Reverts #4557
1 parent 73c6f89 commit 1b13dad

3 files changed

Lines changed: 0 additions & 52 deletions

File tree

.changeset/openai-reasoning-store-true.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/agents/src/model-catalog.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@ function withProviderPayloadDefaults(
267267

268268
return {
269269
...body,
270-
// OpenAI Responses reasoning/tool-call continuations replay rs_*
271-
// reasoning items. With store:false, OpenAI does not persist those
272-
// items server-side, which can make follow-up requests fail with
273-
// "Item with id ... not found". Keep Responses stateful for built-ins.
274-
store: true,
275270
reasoning: {
276271
...existingReasoning,
277272
effort,

packages/agents/test/model-catalog.test.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ describe(`model catalog`, () => {
126126
)
127127

128128
expect(payload).toEqual({
129-
store: true,
130129
reasoning: { effort: `minimal` },
131130
})
132131
})
@@ -146,51 +145,10 @@ describe(`model catalog`, () => {
146145
)
147146

148147
expect(payload).toEqual({
149-
store: true,
150148
reasoning: { effort: `high` },
151149
})
152150
})
153151

154-
it(`forces store true only for OpenAI reasoning model payloads`, async () => {
155-
const openAiCatalog = await createBuiltinModelCatalog()
156-
const openAiConfig = resolveBuiltinModelConfig(openAiCatalog!, {
157-
model: `openai:gpt-5`,
158-
})
159-
160-
expect(
161-
openAiConfig.onPayload!(
162-
{ store: false, reasoning: { effort: `none` } },
163-
{} as any
164-
)
165-
).toEqual({
166-
store: true,
167-
reasoning: { effort: `minimal` },
168-
})
169-
170-
delete process.env.OPENAI_API_KEY
171-
process.env.DEEPSEEK_API_KEY = `test-deepseek-key`
172-
vi.stubGlobal(
173-
`fetch`,
174-
vi.fn(async (url: string) => {
175-
if (String(url).includes(`deepseek.com`)) {
176-
return {
177-
ok: true,
178-
status: 200,
179-
json: async () => ({ data: [{ id: `deepseek-v4-flash` }] }),
180-
}
181-
}
182-
return { ok: false, status: 401, json: async () => ({}) }
183-
})
184-
)
185-
186-
const deepseekCatalog = await createBuiltinModelCatalog()
187-
const deepseekConfig = resolveBuiltinModelConfig(deepseekCatalog!, {
188-
model: `deepseek:deepseek-v4-flash`,
189-
})
190-
191-
expect(deepseekConfig.onPayload).toBeUndefined()
192-
})
193-
194152
it(`does not expose providers whose keys are rejected`, async () => {
195153
vi.stubGlobal(
196154
`fetch`,

0 commit comments

Comments
 (0)