I still don't know what the issue is. But I think it's a permissions one. I was able to get it working with another subscription. I haven't found specifically what's being blocked though.
Azure Open AI Agent Service Code Interpreter fails with server_error...
Schuster Braun
10
Reputation points Microsoft Employee
When trying to create an agent with code_interpreter the run always fails with: server_error: Sorry, something went wrong.
I am referencing Create an Agent Quickstart
I have tried with Python
Pip packages
- azure-ai-projects version 1.0.0
- azure-identity version 1.25.0
Run output failure looks like
Run finished with status: RunStatus.FAILED
Run failed: {'id': 'run_OcWVHMUC8oc6lNJhWU4WWG9D', 'object': 'thread.run', 'created_at': 1758805741, 'assistant_id': 'asst_2wUfk7ySTeZGxUM8a2geNjyM', 'thread_id': 'thread_DqxNutGNUoYqlgpo9BWShhnP', 'status': 'failed', 'started_at': 1758805742, 'expires_at': None, 'cancelled_at': None, 'failed_at': 1758805753, 'completed_at': None, 'required_action': None, 'last_error': {'code': 'server_error', 'message': 'Sorry, something went wrong.'}, 'model': 'gpt-4.1', 'instructions': 'You politely help with math questions. Use the Code Interpreter tool when asked to visualize numbers. Please address the user as Jane Doe. The user has a premium account', 'tools': [{'type': 'code_interpreter'}], 'tool_resources': {}, 'metadata': {}, 'temperature': 1.0, 'top_p': 1.0, 'max_completion_tokens': None, 'max_prompt_tokens': None, 'truncation_strategy': {'type': 'auto', 'last_messages': None}, 'incomplete_details': None, 'usage': {'prompt_tokens': 172, 'completion_tokens': 179, 'total_tokens': 351, 'prompt_token_details': {'cached_tokens': 0}}, 'response_format': 'auto', 'tool_choice': 'auto', 'parallel_tool_calls': True}
I then tried the different configurations mentioned in these Microsoft Q&A threads this thread and this one in the playground. I have:
- Created agents with deployed models: gpt-4o, gpt-4o mini, gpt-4.1, and gpt-4.1 mini
- Attached the code interpreter without uploaded files and with uploaded files
- Adjusted the Temperature and Top_P to under 1
- Given myself Azure AI User, Azure AI Project Manager, Azure AI Account Owner on the resource, project level, and subscription level. I've added and removed the roles in different orders with no difference
- Region deployed is Sweden Central S0
{
name:
context:
attributes:
kind:
}
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
1 answer
Sort by: Most helpful
-
Schuster Braun 10 Reputation points Microsoft Employee
2025-10-02T18:29:51.11+00:00