Skip to main content
Microsoft schedules the pinned gpt-4o-mini model for retirement on October 1, 2026 and lists gpt-4.1-mini as its replacement. Azure OpenAI’s id identifies your deployment, so deploy the replacement and use that deployment name before running. See the Azure model retirement schedule.
azure_openai_reasoning_tools.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Configure the Azure deployment

Deploy gpt-4.1-mini. Name the deployment gpt-4.1-mini, or replace AzureOpenAI(id="gpt-4o-mini") with AzureOpenAI(id="<your-deployment-name>") in the saved file.
5

Run the example

Save the code above as azure_openai_reasoning_tools.py, then run:
Full source: cookbook/10_reasoning/tools/azure_openai_reasoning_tools.py