Problem with Code interpreter and Azure Foundry
10:14 18 Feb 2026

I have a question about agent creation and the use of the Code Interpreter. I cannot find clear documentation explaining why the Code Interpreter in agents only works for the models gpt-4o, gpt-4o-mini, and gpt-4.1. I remember reading something that gpt-5 can use it, but in Azure Foundry it does not.

For example, in Azure Foundry using gpt-4.1 + Code Interpreter, the agent responds without problems and generates the requested chart:

chat generation in azure foundry

If I change the deployment to gpt-5 (version dated August 7, 2025 — Global Standard), I get a popup that indicates this model cannot use the Code Interpreter:

gpt 5 in azure foundry can not use code interpreter

Now, if I perform the same test in the New Foundry with gpt-5 + Code Interpreter, I get a response — the model generates the image without issues:

chat generation in new azure foundry

I would like to know what the recommended approach or the correct documentation is. From my tests, I understand that if I want to use gpt-5 I would have to do it from the New Foundry, which would force me to migrate all my agents to the new Foundry. Any guidance or official documentation references would be appreciated.

azure