The timing is no coincidence. Unwrapped alongside Microsoft's broader Foundry governance (formerly Foundry Control Plane) and AI FinOps push at Microsoft Ignite 2026 in San Francisco, the preview arrives as organizations grapple with the economics of agentic software. In an October 2026 letter to shareholders, Microsoft CEO Satya Nadella observed that customers are shifting toward measuring token costs against actual business outcomes. Industry analysts are sounding the same alarm: Gartner predicted in August 2026 that AI inference costs per agentic workflow will climb more than fivefold through 2028 even as individual token prices fall, largely because multi-step reasoning agents consume vastly more compute than simple single-turn chatbots.
Standard Azure budgets tell you the barn door was left open yesterday. Microsoft Foundry cost controls try to lock the latch while the horse is still mid-stride. Before you wire them into every subscription in sight, however, you need to understand both how this request-time guardrail operates and where its public preview blind spots live.
What Microsoft Foundry Cost Controls Actually Do
At its core, a Foundry cost control is a policy that monitors either US dollar spending or raw token consumption across the AI assets you select, then fires an alert or blocks incoming requests once usage crosses your threshold. Rather than waiting for downstream billing pipelines, Foundry evaluates matching requests as they run.
Each policy consists of six building blocks:
- Budget unit: Either a dollar cap (priced in real time as requests execute) or a token ceiling. Token budgets accept
K,M,B, orTshorthand—such as10Mfor 10 million tokens—and can count all tokens combined or restrict tracking to input tokens, output tokens, or both. - Scope and filters: By default, a control covers every eligible request inside a Foundry resource or project. Administrators can narrow that blast radius using
AND-combined filters for specific projects, model deployments, agents, or up to 20 hosted agent session IDs. - Budget sharing: A single pool shared across all matching workloads, or separate full allocations granted per project, per agent, or per hosted agent session. Notably, stopping and resuming a hosted agent session does not reset its running count.
- Reset period: Daily, weekly, or monthly cycles.
- Active dates: Start and end dates entered in your local time zone and stored in UTC. Every control requires an end date, so long-lived policies must have their expiration extended before they lapse.
- Threshold actions:
Send alert,Block usage, or both—or neither, if you simply want passive telemetry without interfering with traffic.
Once created, a control's name and budget type are locked. In the Foundry portal, the selected token types cannot be modified either, and changing the sharing model or reset cadence zeroes out the current counter and starts fresh.
Resource-Level Governance vs. Project Self-Service
Microsoft splits management into two tiers depending on who holds the purse strings:
- Foundry resource level (
Manage > Cost > Cost Control): Built for platform administrators and FinOps teams managing cross-team budgets. Controls here can span the whole resource or filter down to specific projects, deployments, agents (when paired with a single project filter), or sessions. Creating, editing, or deleting these requiresFoundry Account Owner,Foundry Owner,Owner, orContributor. - Project level (
Monitor > Cost Control): Built for project leads and developers capping their own experiments. Project controls stay scoped strictly to that project, though the tab also displays applicable resource-level policies as read-only.Foundry Project Managerjoins the higher-privileged roles here for management tasks.
If those role names look slightly unfamiliar, Microsoft recently renamed Foundry's RBAC roles: Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously labeled Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. The underlying role IDs and permissions remain identical, though older labels may still surface across portals while the rename finishes rolling out.
Under the Hood: Thresholds, HTTP 429s, and Real-Time Math
How does Foundry keep a budget count current without waiting half a day for Azure Cost Management? It maintains an internal running tally for each active policy. Token budgets simply sum matching tokens; spending budgets multiply those tokens against a snapshot of your organization's negotiated Azure pricing (under an Enterprise Agreement or Microsoft Customer Agreement) or fall back to retail rates where no negotiated price exists.
That architectural shortcut comes with an important caveat: during public preview, cost control totals are estimates and are not reconciled with your final invoice. Because actual billing often applies tiered discounts or contract adjustments absent from the real-time snapshot, Foundry's running tally tends to sit slightly higher than your billed cost—meaning a block can trip a bit early, with the gap widening over longer monthly cycles. Treat cost controls as operational circuit breakers, and continue using Azure Cost Management (or Foundry's Cost overview pages, which pull the same Cost Management numbers after the 8-to-24-hour lag) for financial reconciliation.
What Happens When Traffic Hits the Wall
You can set thresholds using preset percentages (50%, 75%, 80%, 90%, or 100%) or exact dollar/token figures. Microsoft recommends pairing an early warning—say, Send alert at 80%—with Block usage at 100%. The alert threshold must always sit at or below the block threshold.
When a request pushes usage over the Block usage line, two things happen:
- The threshold-crossing request finishes: Foundry does not kill an in-flight call mid-sentence, so final usage can creep slightly above 100%.
- Subsequent matching requests get rejected: Standard API calls fail with HTTP status
429, the headerx-ms-budget-cause: budget_exceeded, and an error message beginning with"Budget exceeded for cost control". When an agent streams its response, the rejection arrives as an error event inside the stream instead.
Requests stay blocked until the reset period rolls over, an administrator raises the budget, or the control is deleted. Keep two timing quirks in mind: policy edits take up to 15 minutes to propagate, and Foundry fails open—if the platform cannot evaluate cost controls in time for an incoming call, the request runs anyway.
For alerts, attaching a Send alert action establishes a shared connection on the Foundry resource to an Azure Event Grid topic configured with the CloudEvents v1.0 schema and key-based authentication. From there, you wire up Logic Apps, Azure Functions, or a webhook to page your team. One critical detail: while usage remains at or above the alert threshold, every single matching request emits a fresh alert event. Unless your Slack channel enjoys being firehosed during a traffic spike, build deduplication into your downstream workflow.
Crucial Preview Caveats and Exclusions
Because this is a public preview governed by the Azure Preview Supplemental Terms—carrying no SLA and explicitly not recommended by Microsoft for production workloads—the fine print matters enormously. Relying on these policies without checking the exclusions list is a quick way to get surprised on your next bill.
| Dimension | Supported in Public Preview | Not Supported / Excluded |
|---|---|---|
| Models | GPT models (e.g., gpt-5.4-mini) and OpenAI o-series models | Third-party models such as Claude and DeepSeek; brand-new GPT models take ~1 week before Spending budgets count them (Token budgets still count immediately) |
| Deployment Types | Standard / pay-per-token deployments covered across billing regions | Provisioned throughput units (PTUs); instant-access requests cannot be isolated by filter |
| Agent Costs | Prompt agents, hosted agents, and hosted sessions (token usage only) | Agent tool charges (such as web search) and hosted agent compute |
| Routing | Basic model deployments | Model router support is incomplete (combined router + selected model fees may be undercounted) |
| Identity Scope | Resource, project, deployment, agent, or session | Per-user or per-Microsoft Entra group budgets |
Beyond the feature matrix, administrators should watch for four operational sharp edges:
- Chat completions blocking quirk: A project-level cost control will count chat-completions requests sent to that project, but it will not block them. Similarly, controls on a Foundry resource's default project count requests to the resource endpoint without blocking. If you need hard enforcement on chat completions, create the control at the Foundry-resource level.
- Application Insights dependency: Alerts and blocks work independently, but you will not see usage progress or states like
On track,Near threshold, orLimit reachedunless an Application Insights resource is linked underUsage data(a shared resource-wide setting) and you hold read access to it. - Project deletion lock: You cannot delete a Foundry project while it still owns project-level cost controls; delete the controls first.
- REST API concurrency: If you automate policy creation via the REST API, send create requests sequentially. Firing concurrent creations against the same Foundry resource can trigger HTTP
409conflicts.
How Cost Controls Fit Alongside Existing Guardrails
Microsoft Foundry already offers several overlapping ways to rein in runaway cloud consumption. Knowing which tool solves which problem keeps your architecture clean:
| Guardrail | What It Caps | Blocks Requests? | Primary Granularity | Telemetry Speed |
|---|---|---|---|---|
| Foundry Cost Controls (Preview) | USD spending or total tokens per reset period | Yes (429 with x-ms-budget-cause) | Resource, project, deployment, agent, or session | Real time (estimated) |
| Azure Cost Management Budgets | Total billed Azure cost | No (alerts & automation only) | Subscription, resource group, resource, or billing scope | Delayed 8–24 hours |
| Foundry Quotas | Throughput (TPM or PTUs) | Throttles over rate limit | Subscription, region, and model | Real time |
| AI Gateway Token Limits | Tokens per minute and periodic token quotas | Yes (429 for TPM; 403 for quota) | Project and model deployment (or caller/app at gateway) | Real time |
| Azure Policy | Allowed models and deployment types | Blocks deployments, not requests | Resource configuration | At deployment time |
When an application calls Foundry through an AI gateway or Azure API Management, the gateway evaluates traffic first. Calls rejected by the gateway never count toward Foundry cost controls. Requests that clear the gateway are then checked against every matching Foundry cost control, and the strictest applicable limit wins. That layering actually solves one of the preview's biggest omissions: use your AI gateway to enforce per-user or per-calling-app token limits, and let Foundry cost controls cap total project, deployment, and agent spending behind it.
Practical Playbook for Pilot Teams
If you are eager to test Foundry's new guardrails in a sandbox or staging environment, a cautious rollout beats flipping hard blocks on day one:
- Start in shadow mode: Create your first control with no threshold actions and link an Application Insights resource under
Usage data. Verify that states populate cleanly (On track,Near threshold) and compare the real-time estimate against Azure Cost Management after 24 hours. - Wire deduplicated alerts before blocking: Add a
Send alertthreshold at 75% or 80% connected to an Event Grid topic (CloudEvents v1.0), and ensure your Logic App or Function suppresses duplicate notifications once a control stays above the line. - Check your endpoints and models: Confirm you are governing supported GPT or OpenAI o-series models, place hard blocks on the Foundry resource rather than the project if chat-completions endpoints are in play, and remember that web search tools and hosted agent compute still bill outside these caps.
- Update client error handling: Teach your applications and agent front ends to catch HTTP
429responses carryingx-ms-budget-cause: budget_exceeded(and stream error events) so users get a graceful explanation instead of a cryptic crash.
Microsoft Foundry cost controls won't replace enterprise FinOps discipline or reconcile your monthly finance spreadsheet just yet. As a real-time safety net for test labs, runaway prompt loops, and eager developer sandboxes, however, they finally give Azure AI teams a way to pull the emergency brake before the billing cycle finishes.
References
- (In preview) Public Preview: Cost controls for model and agent spending in Microsoft Foundry Azure Updates · 2026-11-24T16:43:40Z
- microsoft.com learn.microsoft.com
- microsoft.com techcommunity.microsoft.com