Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hello GS,
Thanks for sharing the details and the error message,
The 500 (server_error) you’re encountering when trying to use the shell tool with the Responses API on Azure OpenAI is not due to an issue in your request.
Instead, it indicates that The built-in “shell” tool is not currently supported in Azure OpenAI deployments, even though it is documented in the OpenAI public API.
Clarification
- The Tools - Shell capability shown in OpenAI documentation applies to the public OpenAI platform
- In Azure OpenAI, the Responses API does not yet natively support the built-in shell tool
Because of this:
Shell tool calls may return:
-
400errors (policy-related, e.g., network restrictions) - or
500 server_error(backend cannot provision execution environment)
So the behavior you're seeing is expected when attempting to use this feature in Azure today.
Why this happens
The shell tool depends on:
- Ephemeral container execution environments
- Secure sandboxing + optional outbound network access
In Azure, these capabilities are:
- Feature-gated
- Not enabled across all regions/subscriptions
- Often restricted due to security and compliance controls
There is currently No portal setting, No API flag, No self-service way to enable it
1: Implement your own “shell tool” using function calling
You can replicate the same behavior by letting the model decide when to run a command, and executing it in your own environment.
How it works:
- Define a function like
run_shell - Let the model generate a function call
- Execute the command in your backend (VM/container)
- Send the output back to the model
Example (Python sketch):
from openai import OpenAI
This is the recommended production pattern in Azure.
2: Use OpenAI public platform
If you specifically need the native shell tool experience:
- You would need to use the public OpenAI API
- The Tools-Shell capability is supported there (as per OpenAI docs)
Can this be enabled in Azure?
At the moment:
- Shell tool support is not generally available in Azure OpenAI
- You can raise a support request to:
- Confirm availability for your subscription/region
- Track feature rollout status
Please refer this
- OpenAI Tools–Shell guide: https://developers.openai.com/api/docs/guides/tools-shell
- How to generate text responses with Microsoft Foundry Models: https://dotnet.territoriali.olinfo.it/azure/foundry/foundry-models/how-to/generate-responses
- Use the Azure OpenAI Responses API: https://dotnet.territoriali.olinfo.it/azure/foundry/openai/how-to/responses
- Problem deploying OpenAI Models (500 errors & token limits): https://dotnet.territoriali.olinfo.it/azure/ai-foundry/openai/quotas-limits
- Common Tools – Azure CLI troubleshooting: https://supportability.visualstudio.com/AzureAppService/_wiki/wikis/AzureAppService/538737/Common-Tools---Azure-CLI
I Hope this helps. Do let me know if you have any further queries.
Thank you!