Code Interpreter tool with store=False

Hi! I’ve been trying to use code interpreter tool with store=False in a multi-turn conversation.

Even though I provide the full item back, including both input and output, I get the below error:

Error code: 404 - {‘error’: {‘message’: “Item with id ‘ci_689b18ab99fc8195bf1e6048ea16edec051e88e72c2cc839’ not found. Items are not persisted when store is set to false. Try again with store set to true, or remove this item from your input.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘input’, ‘code’: None}}

Why does it look up for this item? Does it have any hidden states? Can we avoid that without enabling storage?

1 Like

I am currently facing a similar issue. I am missing some kind of best practices when using store=False.

1 Like

I am having the same issue. Did you manage to find a solution?

Same situation here.

It works when I remove the reasoning item from the conversationHistory I created, but when I use the tools chain, the error occurs.

  1. You will want to replay the same reasoning object you got in output: encrypted content and summary; the API rejects you when not reiterating text that is not actually used. https://platform.openai.com/docs/guides/reasoning#keeping-reasoning-items-in-context
  2. You will want preservation of tool calls and responses then surrounded by that encrypted reasoning and final output content, as on a reasoning model, this tool calling happens within reasoning turns on the internal iterator.
  3. You will want to create a container ID yourself, and maintain its short expiry with activity. 20 minutes is hardly time to analyze a response, use a download product (if you even get a citation - which is AI-written markdown required to access your own container files), see flaws, prompt the model again. The response chain of a server stateful conversation (store:true) is broken consistently, without the AI model knowing about the notebook being reset and thus writing bad code and then making more auto tool containers - now with tiers of billing up to $1.92 per container that you must specify correctly in anticipation (no adapting, no minimum billing). So active self-management of a conversation within budget is the only way to proceed anyway.

Actually… strike any “you will want” above, with instead “build a coding function on Chat Completions”.