BestPaid guides · Azure OpenAI · .NET

Azure OpenAI retires gpt-4o, gpt-4o-mini and gpt-4.1 in 2027: dates, auto-upgrades and moving .NET apps

gpt-4o 2024-05-13 retires on January 14, 2027; the other gpt-4o versions, gpt-4o-mini and the gpt-4.1 family on April 14, 2027. The o-series passed its retirement date on November 19, 2026. Some deployments get a newer model automatically, others stop working. Below: Microsoft's rules as of November 21, 2026, and the .NET changes.

Sources: Microsoft Learn's Model retirement schedule (last updated November 18, 2026), lifecycle policy (July 24, 2026), Working with models (May 13, 2026), reasoning models (November 20, 2026), Model migration process (August 19, 2026), structured outputs (August 24, 2026) and C# SDK (July 22, 2026) pages; the Azure.AI.OpenAI changelog, the 2.1.0 source of AzureChatClient and AzureChatExtensions, NuGet's Azure.AI.OpenAI and Semantic Kernel Azure OpenAI connector pages, Semantic Kernel's reasoning sample, the Microsoft.Extensions.AI OpenAI adapter source and the Microsoft.Extensions.AI.Evaluation docs (June 18, 2026). Checked on November 21, 2026. This page is our own summary; follow the vendor's documentation for every detail.

The dates

Model and versionStage (schedule)Retirement dateReplacement listed
gpt-4o 2024-05-13DeprecatedJanuary 14, 2027gpt-5.1 (2025-11-13)
gpt-4o 2024-08-06DeprecatedApril 14, 2027gpt-5.1
gpt-4o 2024-11-20LegacyApril 14, 2027gpt-5.1
gpt-4o-mini 2024-07-18DeprecatedApril 14, 2027None
gpt-4.1, gpt-4.1-mini, gpt-4.1-nano 2025-04-14DeprecatedApril 14, 2027None
o1 2024-12-17, o1-pro 2025-03-19, o3 2025-04-16, o3-deep-research 2025-06-26, o3-pro 2025-06-10DeprecatedNovember 19, 2026 (passed)gpt-5.6-sol
o3-mini 2025-01-31, o4-mini 2025-04-16DeprecatedNovember 19, 2026 (passed)gpt-5.6-terra
codex-mini 2025-05-16DeprecatedNovember 17, 2026 (passed)None
whisper, tts, tts-hd 001GA (tts: Preview)December 15, 2026None

What happens on the retirement date

Retired means removed from service: all inference requests return 410 Gone. The effect depends on deployment type and settings:

DeploymentWhat Microsoft documents
Global Standard and Data Zone Standard, gpt-4o 2024-05-13Upgraded automatically to gpt-5.1 version 2025-11-13 (unless set to NoAutoUpgrade, below). Traffic starts hitting gpt-5.1; Microsoft notes that an endpoint that still responds doesn't mean the app still behaves correctly, and gpt-5.1 doesn't support parameters such as max_tokens and temperature (see below).
Standard familyUpgrades roll out region by region, timed by versionUpgradeOption: OnceNewDefaultVersionAvailable (within two weeks of a new default version) or OnceCurrentVersionExpired (at retirement; also what null means).
NoAutoUpgradeNever upgraded; stops working on the retirement date.
Regional, Global and Data Zone ProvisionedNot upgraded. Migrate before the date, in place (traffic moves over 20–30 minutes) or side by side, after checking target-model quota.
Global BatchMigrated manually, side by side: deploy the new model and resubmit jobs.
Fine-tunedNot auto-upgraded; re-tune or distill onto the replacement base model.

Microsoft calls auto-upgrade a safety net for pay-as-you-go deployments, not a migration plan. Subscription owners with active deployments get an email at least 60 days before a GA model retires, plus Service Health advisories (Azure OpenAI Service).

List your deployments and their lifecycle status

# deployments
az cognitiveservices account deployment list -g <resource-group> -n <resource-name> \
  --query "[].{name:name, model:properties.model.name, version:properties.model.version, sku:sku.name, upgrade:properties.versionUpgradeOption}" -o table

# lifecycle per region
az cognitiveservices model list -l <region> \
  --query "[?model.name=='gpt-4o'].{version:model.version, status:model.lifecycleStatus, retires:model.deprecation.inference}" -o table

The CLI shows null for an unset versionUpgradeOption and can't change it; use the REST API, Azure PowerShell or the Foundry portal. For checking lifecycle data in code, Microsoft points to the Models API (GET https://management.azure.com/subscriptions/{sub}/providers/Microsoft.CognitiveServices/locations/{location}/models?api-version=2024-10-01), whose terms differ from the docs:

lifecycleStatusStage in the docs
DeprecatingDeprecated: still serves inference, blocked for new customers
DeprecatedRetired: inference returns 410 Gone

If deprecation.inference is in the past, treat the model as retired whatever lifecycleStatus says.

Point .NET code at the replacement deployment

The model name your code sends is the deployment name. Create the replacement next to the old deployment, switch through configuration, and keep the old one until you're sure. Microsoft's current C# samples use the OpenAI package on the v1 endpoint. As of November 21, 2026 the latest stable Azure.AI.OpenAI is 2.1.0 (December 2024) and the latest prerelease is 2.9.0-beta.1 (March 2026), whose changelog suggests dropping the Azure OpenAI SDK in favor of the OpenAI SDK alone.

// OpenAI package; endpoint https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/
#pragma warning disable OPENAI001
var tokenPolicy = new BearerTokenPolicy(new DefaultAzureCredential(), "https://ai.azure.com/.default");
var chat = new ChatClient(
    model: config["AzureOpenAI:Deployment"],          // deployment name
    authenticationPolicy: tokenPolicy,
    options: new OpenAIClientOptions { Endpoint = new Uri(config["AzureOpenAI:Endpoint"]) });

var options = new ChatCompletionOptions
{
    MaxOutputTokenCount = 25_000,                       // sent as max_completion_tokens
    ReasoningEffortLevel = ChatReasoningEffortLevel.Low // gpt-5.1 defaults to none
};

With Azure.AI.OpenAI 2.1.0 (new AzureOpenAIClient(...).GetChatClient(deploymentName)), a set MaxOutputTokenCount goes out as max_tokens. The opt-in, options.SetNewMaxCompletionTokensPropertyEnabled(true) (experimental, AOAI001), throws ArgumentNullException in 2.1.0 when called on a ChatCompletionOptions that hasn't been used in a request yet; the changelog lists the fix in 2.2.0-beta.2, and from 2.7.0-beta.1 it must be called after MaxOutputTokenCount is set. On 2.1.0, either leave MaxOutputTokenCount unset (then neither property is sent) or move to the OpenAI package. Semantic Kernel's Azure connector, which as of November 21, 2026 (version 1.82.0) depends on Azure.AI.OpenAI 2.9.0-beta.1 or later, has the same switch; Microsoft.Extensions.AI wraps the client:

builder.AddAzureOpenAIChatCompletion(deploymentName: deployment, endpoint: endpoint, apiKey: apiKey);

#pragma warning disable SKEXP0010
var settings = new AzureOpenAIPromptExecutionSettings
{
    SetNewMaxCompletionTokensEnabled = true,   // max_completion_tokens, not max_tokens
    MaxTokens = 25_000,
    ReasoningEffort = ChatReasoningEffortLevel.Low
};

IChatClient client = chat.AsIChatClient();     // Microsoft.Extensions.AI
var reply = await client.GetResponseAsync<Invoice>(prompt, new ChatOptions { MaxOutputTokens = 25_000 });

Microsoft's reasoning-models page, for gpt-5.1 and other GPT-5 models:

Re-test prompts, tool calls and structured outputs

Evaluate before you switch

Freeze real inputs, expected outputs and pass criteria. Score the old deployment, then the new one with the same evaluators, on quality, latency and cost per request; Microsoft warns that reasoning tokens, cached input and structured-output overhead can swing unit costs by 2x or more. Microsoft.Extensions.AI.Evaluation works with any test framework (for example MSTest, xUnit or NUnit) and offers evaluators such as EquivalenceEvaluator, GroundednessEvaluator and ToolCallAccuracyEvaluator, plus dotnet aieval reports. Roll out gradually, keep the old deployment until the numbers hold, then delete it.

Still calling gpt-4o, gpt-4o-mini or gpt-4.1 from a .NET app? We move .NET apps that call Azure OpenAI to current model deployments and SDKs at a fixed price, with prompts, tool calls and structured outputs re-tested on the new model. It starts with a $490 audit with a fixed quote.
See the .NET upgrade offer