What changes on January 17
Microsoft's Foundry retirement schedule lists five Phi-4 models in the partners and community section: Phi-4, Phi-4-mini-instruct, Phi-4-mini-reasoning, Phi-4-multimodal-instruct and Phi-4-reasoning. All five are GA, all five retire on 2027-01-17, and all five name the same replacement: microsoft--phi-4 (Foundry Managed Compute).1 Once a model is retired, every inference request returns 410 Gone.2 Today is November 11, so you have 67 days.
Two details in that row matter for the decision. First, the replacement is a different deployment type, not a newer version. Serverless API deployments need no quota from your subscription and are billed per token; managed compute deployments run on VMs you size.34 Second, one replacement is listed for five models. Whether the mini, reasoning and multimodal variants are all deployable on Managed Compute is something to check in your own catalog and region, not something the schedule row proves.
Microsoft's GA retirement notice goes out at least 60 days before retirement, to subscription owners with active deployments.2 For January 17 that is November 18. If the person who owns the Azure subscription is not the person who owns the Phi-4 feature, route that email now.
The break-even in one formula
Serverless charges for tokens whether or not a GPU is busy. Managed Compute charges for VM time whether or not a token flows. Azure's own pricing page describes compute as billed by the second with no long-term commitment under pay as you go, with 1- and 3-year commitment options listed beside it.5 So the comparison reduces to one number: how many of the hours you pay for are filled with work.
def break_even_utilisation(vm_per_hour, tokens_per_sec, serverless_per_m_tokens):
"""Share of sustained capacity you must fill before always-on wins.
tokens_per_sec: aggregate input+output tokens one instance sustains
at YOUR latency target, measured, not a vendor peak figure.
serverless_per_m_tokens: blended $ per million tokens at your
input/output mix.
"""
value_per_hour = tokens_per_sec * 3600 / 1_000_000 * serverless_per_m_tokens
return vm_per_hour / value_per_hour # >1.0 means it can never break even
def monthly_break_even_tokens(instances, vm_per_hour, serverless_per_m_tokens):
"""Tokens per month at which both options cost the same."""
return instances * vm_per_hour * 730 / serverless_per_m_tokens * 1_000_000Every input must be your own. The VM rate comes from the pricing calculator for your SKU and region, the serverless rate from the Pricing and terms tab of the deployment wizard,3 and the throughput from a load test. Microsoft's pricing pages say prices are estimates and may vary with your agreement,5 so use the rates on your own contract.
The table shows the shape of the answer. Dedicated capacity wins only when the VM turns tokens out fast enough that a full hour of them would cost more at the serverless rate than the hour itself. If your measured throughput lands in the top-left of that table, the answer is no regardless of traffic.
Why average utilisation is lower than you think
The table assumes the VM is as busy as its sustained capacity allows. Real traffic is not flat, and you provision for the busy hour, not the mean. If the peak is three times the mean and you size for the peak with no headroom, mean utilisation is at most one third.
Redundancy adds a second multiplier. A single instance is a single point of failure for a user-facing feature, and the managed compute guide's own sample deploys two instances.4 Two instances double the fixed cost and halve utilisation per instance at the same traffic.
Autoscaling narrows the gap but does not remove it. Managed Compute scaling is configured on the online deployment resource in the Azure portal under Settings > Scaling with custom autoscale,4 and the guide notes that creating a deployment takes several minutes. A burst arrives faster than a replica becomes ready, so you still hold headroom for it.
The practical rule: compute break-even on monthly tokens, compare it with your real monthly total from your usage records, and then ask whether your traffic shape can fill that capacity. Volume above the line with a spiky shape is still a loss.
Where Managed Compute wins anyway
A cost comparison is not the only reason to move. Four non-price reasons can justify a dedicated deployment even below break-even:
- Version pinning. Serverless deployments always deploy the latest available model version, and the guide tells you to copy the model ID without its version.3 The managed compute sample pins a specific version in the model ID (
.../models/Phi-4/versions/8).4 If an unannounced weight change would break your output parsing, a pinned deployment is the control. - Predictable latency. A dedicated VM is not shared with other tenants' bursts. That is a hypothesis to test, not a given; see the harness below.
- Isolation of load. A noisy batch job on your own endpoint cannot be starved by another team's traffic if you give it its own deployment.
- Commitment pricing. Azure lists 1- and 3-year options for the VM sizes.5 They lower the hourly rate and raise the cost of being wrong, because the commitment outlives the deployment decision. The schedule I read gave no retirement date for the Managed Compute replacement, so ask before committing past a year.
If none of these applies and your volume is below break-even, the better move may be a different serverless model entirely. The same schedule shows, for example, gpt-5.4-nano and gpt-5.4-mini GA with retirement on 2027-09-21.1 Those are candidates to evaluate against your own prompts, not drop-in equivalents of Phi-4. Microsoft itself says not to wait for a named replacement and to compare quality, latency and cost on your application and data.2
What to re-test before the cutoff
Managed Compute changes the failure modes more than the quality. Run these checks against a real deployment, not the portal's Test tab.
- Quota. Each managed deployment consumes VM core quota per region and per SKU, and exceeding it fails the deployment with a quota error; you request an increase through the Azure portal.4 Serverless needed none.3 Request now, since approval is not instant. The temporary shared quota option deletes the endpoint after 168 hours and is for tests only.4
- Request and response contract. The managed endpoint's target URI in the guide ends in
/score, and key authentication is used.4 Serverless endpoints support the Azure AI Model Inference API.3 Diff the payloads, streaming behaviour, error bodies andusagefields against what your client parses today. - Cold start and readiness. The guide's sample sets probe
initial_delay=1000on both probes and warns that deployment takes several minutes.4 Measure how long a new replica takes to serve its first token, because that is your scale-out lag. - Latency under your concurrency. Time to first token and end-to-end latency at the concurrency you see in the busy hour, not at 1.
- Content filtering. The serverless wizard turns the content filter on by default.3 Check what, if anything, the managed endpoint applies and whether your policy relies on it.
- Variant coverage. Confirm that the exact variants you call, such as mini-reasoning or multimodal, exist on Managed Compute in your region.
- Failure behaviour. Delete a replica and watch what clients see. Deleting a serverless model subscription makes its endpoint Unhealthy,3 so also check that nothing else depends on the old endpoint.
A small harness covers items 3 and 4. It does not care which endpoint it calls, only that send returns time to first token, total time and output tokens.
import statistics, time
from concurrent.futures import ThreadPoolExecutor
def run(send, prompts, concurrency):
"""send(prompt) -> (ttft_s, total_s, out_tokens). Raises on error."""
def one(p):
try:
return send(p)
except Exception:
return None
t0 = time.time()
with ThreadPoolExecutor(max_workers=concurrency) as pool:
results = list(pool.map(one, prompts))
wall = time.time() - t0
ok = [r for r in results if r]
ttft = sorted(r[0] for r in ok)
total = sorted(r[1] for r in ok)
pct = lambda xs, q: xs[min(len(xs) - 1, int(q * len(xs)))]
return {
"concurrency": concurrency,
"errors": len(results) - len(ok),
"ttft_p50": statistics.median(ttft), "ttft_p95": pct(ttft, 0.95),
"total_p95": pct(total, 0.95),
"tokens_per_sec": sum(r[2] for r in ok) / wall, # feeds break-even
}The tokens_per_sec figure at the highest concurrency where p95 still meets your latency target is the throughput input for the break-even formula. Using a vendor peak number instead is how this analysis goes wrong.
A cutover plan that fits 67 days
Keep serverless live until the day before retirement, because it is your rollback. The dates below are one reasonable schedule, not a Microsoft process.
| Window | Step |
|---|---|
| Now to Nov 18 | Find every caller of the five models; route the retirement notice to the right owner; file the VM quota request. |
| Nov 18 to Dec 4 | Deploy a managed endpoint; run the schema diff, harness and variant checks; compute break-even from measured throughput. |
| Dec 4 to Dec 15 | Decide: Managed Compute, or a different serverless model. Run your own quality set on the choice. |
| Dec 15 to Jan 8 | Shift traffic in steps, such as 5%, 25%, 50%, 100%, holding at each step through a peak. Skip the shift during any holiday change freeze you already have. |
| Jan 8 to Jan 16 | 100% on the new target, serverless kept as fallback, alerts on error rate and time to first token. |
| Jan 17 | Remove serverless callers; any straggler now gets 410 Gone. |
For the traffic shift, a gateway with weighted targets lets you change the split without redeploying clients. If your managed endpoint, or a self-hosted server in front of the same weights, is exposed as an OpenAI-compatible HTTPS endpoint, INFRO can connect it and send it a small weighted share with a hosted model behind it; the setup is in self-hosted models behind an OpenAI-compatible endpoint.6 Health-aware routing and failover retry a request that times out or returns a 5xx before the response starts, and per-request usage records give you the token totals and latency to feed back into the formula. INFRO does not judge answer quality, so the quality set stays yours.
