Responses API charges Code Interpreter, even if not used

Markus von Staden 5 Reputation points
2025-11-17T09:27:30.3466667+00:00

Hi everyone,

after migrating from the Assistants API to the Responses API, we are encountering unexpected billing behavior:

For every single request, a Code Interpreter call is being charged, even though:

  • type is set to "auto"
  • no files are provided
  • no tool usage is intended
  • and importantly: the model does not return any output_item of type code_interpreter.

In other words, the Code Interpreter is never used, yet it is always billed.
We didn't encounter this behavior with the Assistants API before.

If relevant: We manage our own message history. We still have store=true, because the code interpreter won't work otherwise.

Is this a known issue or reproducible on your side? This 10x our costs last month.

Should Code Interpreter usage be billable even when no output_item is returned?

Thanks in advance!

Azure OpenAI in Foundry Models

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.