Microsoft Foundry Cost Controls: Real-Time Budgets for Models and Agents

Microsoft Foundry cost controls entered public preview on November 24, 2026. They address a practical FinOps gap: Azure Cost Management can report and alert on billed cost, but it is not designed to stop model or agent requests while they are running. Foundry cost controls evaluate usage as requests execute and can notify operators or block new requests when a configured spending or token threshold is reached.

Architecture takeaway: a dashboard tells you what was spent; a runtime cost control can prevent additional applicable requests. Neither replaces capacity planning, chargeback, telemetry, or application-level handling of rejected requests.

What Microsoft released

CapabilityHow it worksStatus
Budget basisEstimated spending or token consumptionPublic preview
ScopeFoundry resource, project, model deployment, agent, or hosted agent sessionPublic preview
Reset periodDaily, weekly, or monthlyPublic preview
ActionsSend an Event Grid alert or block new applicable requestsPublic preview
Current model supportAzure OpenAI model deploymentsPreview limitation

The controls can cover all applicable usage or target a specific project, deployment, agent, or session. Foundry evaluates requests against the current reset period. A blocking action rejects new matching requests after the threshold is reached; during streaming, the block can appear as an error event in the stream.

How cost controls differ from Azure Cost Management budgets

QuestionFoundry cost controlAzure Cost Management budget
When is usage evaluated?As model or agent requests runAfter usage reaches the billing pipeline
Can it block requests?Yes, when configuredNo; it primarily alerts
GranularityProject, deployment, agent, or sessionSubscription and Azure cost dimensions
AmountEstimated spend or tokensBilled Azure cost
Best useRuntime guardrailFinancial reporting, forecasting, and governance

These mechanisms should be used together. Azure Cost Management remains the financial source for billing and forecasting. Foundry controls provide a faster operational guardrail, but their spending totals are estimates and are not reconciled with the final Azure bill.

Reference architecture

LayerResponsibility
ApplicationHandles quota errors, retries only when appropriate, and presents a useful response
Foundry projectHosts models and agents and applies scoped cost controls
Event GridDistributes threshold events to automation and operations
AutomationCreates tickets, notifies Teams, pauses noncritical workflows, or requests approval
Azure MonitorCorrelates requests, tokens, latency, errors, and agent behavior
Cost ManagementProvides billed cost, forecast, allocation, and chargeback

Practical implementation

1. Establish ownership and allocation

Define the business owner, environment, project, model deployment, agent, and expected unit economics. A budget without an owner becomes an alert that nobody acts on.

2. Choose the right scope

  • Use a resource-level control as an overall safety boundary.
  • Use project controls to separate teams or products.
  • Use deployment controls for expensive or experimental models.
  • Use agent or hosted-session controls when one workflow can generate long tool chains or repeated calls.

3. Configure thresholds and actions

Create the control in the Foundry portal or REST API. Use an alert threshold before the blocking threshold so operators have time to investigate. Connect alerts to the Event Grid topic created for the Foundry resource and route them to the organization’s existing incident or approval workflow.

4. Design for rejection

Blocking is not graceful by itself. Applications must recognize the cost-control response, stop uncontrolled retries, preserve work state, and offer an approved fallback such as a cheaper model, a delayed queue, or a request for additional budget.

5. Validate with controlled traffic

  • Generate known token usage in a nonproduction project.
  • Confirm that alerts include the expected project, agent, model, and deployment dimensions.
  • Verify that blocking applies only to the intended scope.
  • Test streaming and nonstreaming clients.
  • Compare Foundry estimates with Azure Cost Management after billing data arrives.

Security and governance considerations

  • Limit who can create or change cost controls; increasing a limit is a privileged governance action.
  • Monitor changes to controls and Event Grid connections.
  • Do not treat a budget as a data-loss-prevention or content-safety policy.
  • Prevent retry storms when a request is blocked.
  • Maintain an emergency process for legitimate production demand without granting broad permanent limits.

Preview limitations

  • Foundry cost controls are preview features and do not carry a production SLA.
  • Current support is focused on Azure OpenAI model deployments.
  • Spending values are estimates rather than final invoice amounts.
  • Controls apply to matching new requests; they cannot reverse consumption that already occurred.
  • Regional, model, and tenant availability should be verified before making the control part of a critical production design.

Recommended adoption plan

  • Start with alert-only controls in a development project.
  • Add a blocking control to an experimental or batch workload.
  • Integrate Event Grid events with the existing incident workflow.
  • Create dashboards for cost per successful task, not only cost per request.
  • Move to production only after applications handle limits without retry loops or data loss.

Related Under Framework guides: Azure AI Gateway architecture and governance and Azure Observability Skills Plugin.

Official references

Leave a Comment