Lesson 3 of 4 Deploying Foundation Models in Foundry

Model Versioning and Deployment Strategies

This lesson explains the model lifecycle, the version upgrade options of a deployment, and how new models and versions are introduced safely.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the model lifecycle stages and notice periods.
  • Compare the versionUpgradeOption values.
  • Explain how provisioned deployments handle upgrades.
  • Describe a safe release of a new model version.

Model versions and lifecycle

Each model has versions, usually identified by a date, such as gpt-5-mini version 2025-08-07. A version moves through lifecycle stages: preview, generally available, optionally legacy, deprecated (no new deployments by new customers) and retired, after which calls return HTTP 410 Gone.

For models sold directly by Azure, the standard lifecycle is about 18 months from general availability to retirement, with deprecation for new customers around 12 months after launch. Microsoft gives at least 60 days' notice before retiring a GA model and at least 30 days for preview models, and retirement dates cannot be extended. The Foundry documentation publishes a retirement schedule, and the Models API exposes each model's lifecycle status.

Version upgrade options

Each deployment pins a version and has a version upgrade option (versionUpgradeOption) that decides what happens when newer versions appear. The option is set in Bicep, ARM, REST or the portal.

OptionBehaviourRisk
OnceNewDefaultVersionAvailableUpgrades when Microsoft sets a new default versionBehaviour can change without a release
OnceCurrentVersionExpiredUpgrades only when the current version retiresA forced change at retirement time
NoAutoUpgradeNever upgradesThe deployment stops working when its version retires

Auto-upgrade applies to Global Standard, Data Zone Standard and Standard deployments. Provisioned deployments are not auto-upgraded: their versions are changed deliberately. A production application that has been evaluated on one version usually uses NoAutoUpgrade or OnceCurrentVersionExpired, with the retirement date tracked so that the upgrade is planned, tested and released before it is forced.

Pinning is not forever

NoAutoUpgrade does not protect against retirement; it only prevents early change. A deployment pinned to a retired version fails. Track lifecycle dates and schedule each upgrade as a release.

Introducing a new model or version

A model change is a release like any other, and the same principles apply as for machine learning endpoints: test before exposure, expose gradually, keep the old version for rollback.

  1. Create a separate deployment

    Deploy the new model or version under a new deployment name, such as chat-v2, beside the current one.

  2. Evaluate offline

    Run the evaluation dataset against both deployments and compare quality, safety, cost and latency.

  3. Adjust prompts

    New versions often respond differently; tune the prompt for the new model and re-evaluate.

  4. Shift traffic gradually

    Route a share of requests to the new deployment through a gateway or application configuration, and watch online metrics and continuous evaluation.

  5. Complete or roll back

    Move all traffic, then remove the old deployment after an agreed period; or move traffic back.

Gateways and configuration

Traffic shifting needs something between the application and the deployments. Two patterns are common, and they can be combined.

Application configuration
How traffic movesThe app reads the deployment name, or a percentage, from configuration such as Azure App Configuration feature flags
Extra capabilitiesPer-user targeting with feature filters
EffortLow
Choose when One application, simple switching
API gateway (Azure API Management)
How traffic movesGateway policies route or split requests between backend deployments
Extra capabilitiesLoad balancing, circuit breakers, token limits, token metrics, semantic caching
EffortHigher, but shared by many applications
Choose when Many applications, shared policies and resilience

Either way, the deployment name is configuration, not code, so switching models or rolling back is an operational change rather than a new application release.

Worked example

An unexpected change in behaviour

An assistant's answers became noticeably longer one morning, raising token costs by 30 percent, although nobody changed the application. The deployment uses OnceNewDefaultVersionAvailable. The team wants model changes to happen only after evaluation, and must avoid an outage when the current version retires in five months.

The deployment was upgraded automatically when a new default version was set. Set versionUpgradeOption to NoAutoUpgrade (or OnceCurrentVersionExpired) in the Bicep template, and plan the upgrade as a release: deploy the new version as a separate deployment, evaluate it and adjust the prompt, then shift traffic gradually well before the retirement date, which the team tracks.

Lowering the maximum output tokens would cap the length but not stop future unplanned changes. Moving to a provisioned deployment to avoid auto-upgrade changes the billing model for an unrelated reason. Leaving NoAutoUpgrade without tracking the retirement date would cause an outage in five months.

Check yourself

Which versionUpgradeOption keeps a deployment on its current version until that version expires?

Show answer

OnceCurrentVersionExpired. OnceNewDefaultVersionAvailable upgrades when a new default is set, and NoAutoUpgrade never upgrades, so the deployment stops working when the version retires.

Exam Tips

Remember for the exam

  • Lifecycle: preview, GA, legacy, deprecated, retired (HTTP 410); GA retirements have at least 60 days' notice.
  • versionUpgradeOption: OnceNewDefaultVersionAvailable, OnceCurrentVersionExpired, NoAutoUpgrade.
  • Provisioned deployments are not auto-upgraded.
  • Release new versions as separate deployments, evaluate, shift traffic gradually, keep rollback.