Skip to content

Architecture and migrationGuide

FLUX retirements on Azure Foundry: move image calls without a rewrite

Four Black Forest Labs models leave Azure Foundry in January 2027, and the schedule lists no replacement for any of them. This guide shows how to put a stable request shape in front of your image calls, map FLUX parameters to a new backend, and canary the change before the dates.

By INFRO Editorial

Published

9 min read

One application request entering a central AI gateway and branching to many model routes

In short

FLUX-1.1-pro and FLUX.1-Kontext-pro retire on Azure Foundry on 2027-01-05, FLUX.2-flex and FLUX.2-pro on 2027-01-20, with no replacement listed.1 Keep one internal request shape, write a small adapter per backend, and shift traffic with a weighted canary rather than editing every call site.

Key takeaways

  • Azure Foundry retires FLUX-1.1-pro and FLUX.1-Kontext-pro on 2027-01-05 and FLUX.2-flex and FLUX.2-pro on 2027-01-20; the schedule lists no replacement for any of them.
  • Foundry serves FLUX.2 only through the BFL-specific API and FLUX-1.1-pro and Kontext through an OpenAI-style Image API, so you may have two request shapes to unify, not one.
  • Put one internal request shape in front of image calls and translate it per backend; the migration then touches an adapter and a config value, not every call site.
  • Do not expect the same pixels from the same seed on another backend: compare size, format, reference-image handling and moderation behavior, then score output with a frozen prompt set.
  • Canary with weighted traffic, keep the old deployment as a standby until the retirement date, and remember Microsoft says retirement dates are not extendable.

What retires, and when

Microsoft's Foundry retirement schedule lists four Black Forest Labs models, all at the GA stage, with a retirement date and no replacement named.1

ModelRetirement dateDays from 2026-11-15Replacement listed
FLUX-1.1-pro2027-01-0551none
FLUX.1-Kontext-pro2027-01-0551none
FLUX.2-flex2027-01-2066none
FLUX.2-pro2027-01-2066none
Retirement dates from the Foundry retirement schedule, page last updated 2026-09-23.

Three facts from the lifecycle policy shape the plan. Retired models return 410 Gone on every inference request.2 Microsoft picks an official replacement roughly 90–120 days before retirement, and where it names one that is also the auto-upgrade target;2 for FLUX, none is listed, so assume nothing upgrades for you. And the migration guidance states that retirement dates are not extendable and there is no exception process.3

Re-read the schedule before you commit to a target. It is a living page, and a replacement may appear after the date on which this article was checked.

Two request shapes may be in your codebase

Foundry exposes FLUX through two routes, and which one your code uses depends on the model.4

  • The BFL provider-specific API supports all four models and accepts extra parameters: guidance, steps, seed, aspect_ratio, safety_tolerance and output_format. Its URL path uses a model path (flux-2-pro, flux-2-flex, flux-kontext-pro, flux-pro-1.1) that is not identical to the model id.
  • The Image API is an OpenAI-compatible endpoint available only for FLUX.1-Kontext-pro and FLUX-1.1-pro, taking n and size and returning a URL.

So a team on FLUX.2-pro is likely calling a BFL-shaped body (width, height, num_images, input_image, input_image_2), while a team on FLUX-1.1-pro may be calling client.images.generate. If call sites across services build these bodies themselves, a retirement is a multi-repo change. That is the real cost to remove: not the model swap but the number of places that know a vendor's body.

The fix is the usual one. Define one internal image request, make a single module the only code that talks to a backend, and let a config value pick the backend. The rest of this guide assumes that boundary exists, or that you build it first.

The stable shape: one request in, one result out

Keep the internal shape small and in your own vocabulary. Anything a backend cannot honor should fail loudly in the adapter rather than be silently dropped.

image_boundary.py
from dataclasses import dataclass, field

@dataclass
class ImageJob:
    prompt: str
    width: int = 1024
    height: int = 1024
    n: int = 1
    seed: int | None = None
    fmt: str = "png"                      # "png" | "jpeg"
    refs: list[bytes] = field(default_factory=list)  # reference images
    tags: dict = field(default_factory=dict)         # feature, tenant, canary arm

@dataclass
class ImageResult:
    images: list[bytes]
    backend: str                          # which backend actually served it
    width: int
    height: int
    fmt: str

def to_azure_bfl(job: ImageJob, model_id: str) -> dict:
    body = {
        "model": model_id,                # e.g. "FLUX.2-pro"
        "prompt": job.prompt,
        "width": job.width,
        "height": job.height,
        "num_images": job.n,
        "output_format": job.fmt,
    }
    if job.seed is not None:
        body["seed"] = job.seed
    for i, ref in enumerate(job.refs):    # input_image, input_image_2, ...
        key = "input_image" if i == 0 else f"input_image_{i + 1}"
        body[key] = ref.decode("ascii")   # base64 text already
    return body

def to_gateway(job: ImageJob, model: str) -> dict:
    body = {
        "model": model,                   # a model id or a route slug
        "prompt": job.prompt,
        "n": job.n,
        "size": f"{job.width}x{job.height}",
        "response_format": "url",
    }
    if job.seed is not None:
        body["seed"] = job.seed
    return body

The first adapter follows the body Microsoft documents for FLUX.2 [pro], including numbered reference-image fields.4 The second targets INFRO's /v1/images/generations shape, where the model is a vendor/model id like bfl/flux-2-pro or the slug of a route.5 Only the adapter changes when the backend does.

Parameter mapping

The same intent is spelled differently on each surface. This table maps the fields a typical FLUX caller uses.

IntentFoundry BFL APIFoundry Image APIINFRO /v1/images
Promptpromptpromptprompt (up to 32,000 characters)
Dimensionswidth, height, aspect_ratiosizesize, or resolution plus aspect_ratio, not both
Countnum_imagesnn, 1–10
Formatoutput_formatnot set in the documented examplesresponse_format: url or b64_json
Seedseednot shownseed, forwarded only where the model takes it
Guidance, stepsguidance, steps (FLUX.2 [flex] example)not availableno universal field; check the model's settings
Safety levelsafety_tolerancenot shownnot a universal field
Referencesinput_image, input_image_2…images/edits (Kontext only)/v1/images/edits
Field mapping. "Not shown" means the page's examples do not use it, not that it is unsupported.

Sources for the columns: Foundry's FLUX page for the first two,4 and INFRO's image docs for the third.5

Two mapping details cause most surprises. First, INFRO passes size to the provider unchanged, and a resolution tier or aspect ratio the model cannot render on a target is refused before that target is called.5 That is useful, since you learn about an unsupported ratio from a 400 and not from a wrongly cropped image, but it means your adapter should send exact pixels or tiers deliberately. Second, quality is sent only where a model has a quality setting and is dropped elsewhere, so a FLUX-era caller that never set it will not see a difference, while one that expects it to matter on a GPT Image target will.5

Fields with no portable equivalent, such as guidance, steps and safety_tolerance, should live in a per-backend options dict in your config, not in the shared shape. If you rely on them for look, you are tuning to FLUX, and the new backend needs its own tuning.

Output differences to check

A swap that returns HTTP 200 can still break downstream code. The migration guidance says a different model can quietly shift formatting and output shape and break code that depends on the old behavior.3 For images, check these:

  • Dimensions and format. FLUX.2 [flex] outputs one image as PNG or JPG with a maximum of 4 MP;4 a new target may round sizes, cap resolution or return a different container. Assert width, height and MIME type on every result in the canary.
  • Count. INFRO sends n to the provider as-is, a provider may return fewer, and usage.images counts what came back.5 Do not assume len(images) == n.
  • Delivery. Foundry's BFL responses carry a URL or base64 data.4 INFRO's default returns a signed link to a copy it stores for 24 hours, and b64_json returns the image inline, at several megabytes each.5 Download and keep what you need; do not store the link as the asset.
  • Reference images. FLUX.2 [pro] takes up to eight and FLUX.2 [flex] up to 10 reference images,4 and a different model may take fewer or none. A request with more references than the target takes must fail in the adapter, not be truncated.
  • Seeds. Seeds are best-effort and forwarded only where supported.5 A fixed seed on a new backend gives you a stable draw within that backend, not the old images.
  • Moderation. Refusal behavior differs by model. Track refusal rate per arm; a prompt set that always passed on FLUX may not on the target.

Choosing a target without a listed replacement

With no official replacement, you choose. The options, without ranking them:

  1. Another host of the same FLUX family. INFRO's docs give bfl/flux-2-pro as an example model id and say image requests can be served by connections to providers including OpenAI, Azure OpenAI, Google AI, Vertex AI, Together AI, OpenRouter, Runway, KIE, LaoZhang API, fal.ai, Replicate and OpenAI-compatible endpoints.5 Which models each of those serves for your account is in the catalog, and a model is available only if one of your own connections serves it.6 Same family keeps prompt style, but you take on a new vendor contract and a new credential.
  2. A non-FLUX model that stays on Azure. The same schedule shows gpt-image-2 at 2027-10-21 and gpt-image-2.5-flare and -sunburst at 2027-09-09, among other image models.1 That keeps your Azure contract and data path, but it is a different model with different prompt conventions and no FLUX-specific parameters.
  3. Another vendor's image model through your own connection. The widest quality search, and the largest prompt rework.

Whichever you pick, follow Microsoft's own advice: evaluate on your application, prompts and representative data, comparing quality, latency and cost together, and confirm API compatibility, regional availability, capacity and quota.2 Replay your current configuration unchanged on the target first, then tune, so you can separate what the model changed from what you changed.3

Cost belongs in that comparison, but this article does not quote rates: none were confirmed. Use the vendor's own price page for each candidate, apply your negotiated rate if you have one, and project from your historical image counts and size mix.

A canary plan that fits the calendar

You have roughly 51 days to the first date. Work backwards and leave a week of slack, since a retired model returns 410 Gone.2

  1. Freeze a prompt set. Pull a few hundred real prompts, stratified by feature, with and without reference images and with text in the image. Do not edit it mid-migration; Microsoft's guidance is to keep inputs and success criteria fixed or you cannot compare.3 Production content capture is opt-in and never retroactive, so turn it on now if it is off.
  2. Shadow run. Send the set to the target offline. Check the contract: dimensions, format, count, refusals, latency. Fix adapter errors here.
  3. Blind review. Have reviewers choose between old and new outputs without labels. Use pairwise preference per feature, not one global score.
  4. Weighted canary. Move live traffic in steps behind one name. INFRO's weighted route picks the first target at random in proportion to its weight and still falls through the rest if it fails; a target at weight 0 is a standby.7 The route name is what your application sends as model, so the code does not change between steps.7
  5. Hold the old path as standby until the retirement date, then remove it.

Rules on a route can carry a request-level condition such as has_images, feature or end_user_id,7 which lets you canary reference-image edits separately from plain text-to-image, or keep an internal team on the new backend first. Fallbacks and connection failover act only before the response starts, and the response names the model, provider and connection that served it,8 so tag every result with its arm and compare the arms from the log, not from memory.

What a gateway does and does not do here

A control plane can carry this migration but cannot make two models equal. In INFRO, image requests share one shape across providers, the route holds the backend choice in configuration, and each response records the serving provider and estimated provider cost in usage.cost.5 INFRO records vendor retirements and refuses a retired model from its shutdown date with an error naming the replacement, but its docs say Azure runs its own schedule and is covered only when Azure's own date is recorded,6 so confirm the Foundry FLUX dates in the console and do not rely on a refusal as your cutover trigger. INFRO never answers with a different model on your behalf.6

The checks above (frozen prompt set, blind review, per-arm metrics) stay your job, with or without a gateway.

Checklist

  • List every service and repo that calls a FLUX deployment, and which of the two Foundry routes it uses.
  • Route all of them through one module with the internal request shape.
  • Re-read the retirement schedule for a newly named replacement.
  • Shortlist two targets and confirm region, quota and contract for each.
  • Freeze a prompt set, including reference-image and text-in-image slices.
  • Assert dimensions, MIME type and image count in the adapter.
  • Run a shadow pass, then blind pairwise review.
  • Canary in steps with the old path kept as standby.
  • Remove the FLUX deployments after cutover and update your docs and runbooks.
  • Finish before 2027-01-05 for FLUX-1.1-pro and Kontext, and before 2027-01-20 for FLUX.2.

Questions readers ask

Will Azure auto-upgrade my FLUX deployments at retirement?
Do not plan on it. The retirement schedule lists no replacement for any of the four FLUX models.1 Microsoft says auto-upgrades target the listed replacement where supported, and that retired models return 410 Gone, so treat the date as a hard stop.2
Can I keep the same seed to reproduce images on a new backend?
Treat seeds as best-effort. INFRO forwards a seed only to providers whose model takes one and drops it elsewhere,5 and a different backend or model version will not reproduce the same pixels even when it accepts the value. Compare outputs by scoring, not by pixel diff.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Image, video, and audio

    Available with a plan

    One request shape per modality across every model, with video and long audio running as async jobs.

    Read the documentation for Image, video, and audio
  • Health-aware routing

    Available with a plan

    Named routes use priority or weighted targets over your own connections, with health checks, retries and failover.

    Read the documentation for Health-aware routing
  • Model retirements

    Available with a plan

    INFRO records each vendor's model deprecations and shutdown dates, warns organizations still sending a retiring model, and from the shutdown date refuses it before any provider call, naming the replacement.

  • Usage and cost per request

    Available with a plan

    Every request records its model, latency, token or unit counts, and estimated provider cost, queryable by project and key.

    Read the documentation for Usage and cost per request
  • Media re-hosting

    Available with a plan

    Generated media is copied to INFRO storage so output URLs do not expire underneath your application.

  • Cost estimates before a request

    Available with a plan

    Ask what a request would cost on your own provider account before you make it: per image with resolution and quality tiers, per second of video, per character of speech, per token of text.

    Read the documentation for Cost estimates before a request
  • Model catalog

    Available now

    Text, image, video, and audio models with each vendor's reference rate, browsable now at /providers.

    See the details for Model catalog

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Model retirement schedule (opens in a new tab) — Microsoft Learn. Accessed Nov 15, 2026.
  2. 2.Microsoft Foundry Models lifecycle and support policy (opens in a new tab) — Microsoft Learn. Accessed Nov 15, 2026.
  3. 3.Model migration: upgrade or switch models in Microsoft Foundry (opens in a new tab) — Microsoft Learn. Accessed Nov 15, 2026.
  4. 4.Deploy and use FLUX models in Microsoft Foundry (opens in a new tab) — Microsoft Learn. Accessed Nov 15, 2026.
  5. 5.Image generation — Modalities (opens in a new tab) — INFRO Docs. Accessed Nov 15, 2026.
  6. 6.Models — Get started (opens in a new tab) — INFRO Docs. Accessed Nov 15, 2026.
  7. 7.Routes — Features (opens in a new tab) — INFRO Docs. Accessed Nov 15, 2026.
  8. 8.Failover & fallbacks (opens in a new tab) — INFRO Docs. Accessed Nov 15, 2026.

About this article

Read on 2026-11-15: Microsoft Learn's Foundry model retirement schedule (last updated 2026-09-23), lifecycle policy, model migration process and FLUX how-to pages, plus INFRO's image, models, routes and failover docs. Provider rates, quality rankings and replacement-model claims were left out because no replacement is listed and no FLUX rates were confirmed.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.