What this thread does
Do first: Upgrade llama-index-llms-openai to 0.6.26 and use store=False for non-stored history.
Symptom
RiccardoRubini reported a 400 from OpenAIResponses when a tool call followed thinking. The message included `Items are not persisted when store is set to false. Switching to store=True produced a different error saying a reasoning item lacked its required following item. The report lists core 0.14.8 and OpenAI integration 0.6.9`. Other participants commented on the issue: [dosubot[bot]](https://github.com/run-llama/llama_index/issues/20333#issuecomment-3606933943), Prozac614, sridhar-mani. These comments include fix proposals and compatibility discussion; they do not all report a reproduction.
Cause
The integration serialized reasoning blocks using item IDs that were unavailable with store=False. Although the PR description describes omission broadly, the merged implementation makes omission conditional: reasoning blocks are omitted when storage is false. See the merged fix.
Fix
1. Upgrade llama-index-llms-openai to 0.6.26, listed with this fix in repository release v0.14.16. 2. For the non-stored history path, use store=False. In the serializer, this prevents ThinkingBlock items from becoming reasoning references in the next request.
At repository tag v0.14.26, the serializer still includes reasoning only inside if store. The OpenAIResponses implementation passes the storage setting into serialization. See the source at the November 2026 stable tag and the Responses implementation.
Fixed in
First stable fix: v0.14.16 (released 2026-03-10), containing PR #20725, merged 2026-03-03. The supplied release evidence identifies no earlier pre-release. This repository release lists the OpenAI integration as 0.6.26.
If it still fails
- Limits: the merged code and the
v0.14.26source retain reasoning serialization withstore=True; the PR's broad description does not establish that this branch fixes every missing-follow-up 400. track_previous_responses=Trueforces storage on in the inspected implementation, so it is outside the non-stored path described here.
Not for: OpenAI Python SDK null-item crashes in the Responses stream accumulator.
Sources
- [[Bug]: OpenAI Responses API - Tool Call After Thinking Fails with 400 Error](https://github.com/run-llama/llama_index/issues/20333), RiccardoRubini, opened 2025-12-03; closed as completed on 2026-03-03: "I'm having issues with the OpenAI Responses API when combining thinking with tool calls."
- fix-openai-toolcall-after-thinking #20333, martinalupini; merged 2026-03-03 (closed).
- v0.14.16, published 2026-03-10.
- v0.14.26, published 2026-11-13; November 2026 stable release named in the evidence.
- Implementation at v0.14.26, source read on 2026-11-24.
- Responses storage implementation at v0.14.26, read on 2026-11-24.
Checked
2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source plus Responses storage implementation; no command was run.
Started from a post by @RiccardoRubini, packaged by the editor. Original post