Blank white background with no objects or features visible.

TrueFoundry reconnu dans le Hype Cycle de Gartner pour l'ingénierie de plateforme 2026. Lire le rapport complet →

Rejoignez notre écosystème de VAR et VAD — offrez une gouvernance de l'IA d'entreprise pour les LLM, les MCP et les agents. Devenez partenaire →

Seeing the Bill Before It Lands: Forecasting Enterprise AI Spend

Par Boyu Wang

Published: June 23, 2026

How to turn your AI Gateway's cost data into a forward-looking budget forecast — with an early-warning signal before you breach — using two well-understood time-series models, run end to end on TrueFoundry.

The tokenmaxxing trilogy made the case for attribution: you cannot govern spend you cannot see. The Field Notes follow-up on the Meta / Amazon / Uber whipsaw argued that attribution alone gives you a dial instead of a switch. But a dial still leaves one question unanswered: not "where did the money go?" — that is the rear-view mirror — but "where is it going?" When Uber was reported to have burned through its entire 2026 AI coding budget in four months, the problem was not that the spend was invisible. It was that nobody had a credible projection of when the budget would run out until it already had.

This post is about closing that gap with a forecast. We will walk a fictional but realistic company — Meridian, a mid-size fintech with about 800 engineers — from "we have attributed cost data" to "we have a weekly, self-updating projection of token spend per team, with an honest uncertainty band and an alert that fires before the budget breaks." We will use two complementary time-series models, SARIMAX and Prophet, and we will build, deploy, and re-train the whole thing on TrueFoundry — the same platform that emits the gateway cost telemetry, which also provides the ML infrastructure to train, serve, and retrain the forecaster.

Why this matters

Cost governance has three stages, and most teams stop at the first. Stage one is attribution: the gateway records what every request cost and tags it by team, model, and route. Stage two is control: budgets and rate limits that bound spend. Stage three — the one almost nobody reaches — is forecasting: a forward projection that turns "we are at 60% of budget" into "at the current trajectory we breach in five weeks, and here is the team driving it." Attribution is necessary but backward-looking. A forecast is what lets a platform or finance team act in the window before a cap becomes the only option left. That forward view is exactly what would have turned Uber's four-month budget burn from a surprise into a planned conversation in month two.

Two threads run through this post, and it is worth naming them so you know which is which. The main thread is the one that matters to you regardless of what you run: how to turn attributed cost data into a forecast that helps an organization spend its AI budget wisely — the models, the uncertainty band, the backtesting, the early warning. You could implement all of it on any infrastructure. The secondary thread is a convenience observation: the same platform that emits your gateway cost telemetry also provides the ML infrastructure to build and run the forecaster, and the agent harness to govern the loops that drive the spend — so the whole stack can live in one place rather than three. We keep the second thread subordinate on purpose; the forecasting is the point, and the consolidation is just a bonus if you happen to be on TrueFoundry already.

TL;DR Attribution is the rear-view mirror; forecasting is the windshield. Once the AI Gateway is emitting attributed per-request cost, that stream — given consistent tagging — is a clean weekly time series, and time series can be forecast. Two models earn their place: SARIMAX (seasonal ARIMA with exogenous regressors) when you have causal drivers like headcount or agent count and want model-based intervals you can audit on a few high-value cost centers; and Prophet when you want a robust, fast baseline across many messy series with holidays and changepoints. They are complements, not competitors: Prophet for breadth, SARIMAX for driver-based "what-if." The often-missed parts are operational: a forecast must be backtested before anyone trusts it, and it must stay current — which means training, versioning, serving, and scheduled re-training. TrueFoundry runs that loop as an ML platform on Kubernetes, with the training and serving workloads on the same customer compute plane as the gateway, close to the data. The honest caveat: a forecast is decision support, not an oracle; its value is the early-warning window and the uncertainty band, not a single number.

From attribution to a time series

Everything here depends on one precondition: clean, attributed cost data with a timestamp. That is exactly what a well-instrumented AI Gateway can produce: request-level cost — auto-priced from providers' published rates — with the metadata needed to aggregate spend by team, route, model, customer, or cost center. As covered in the trilogy and the observability overview, every request through the gateway emits that cost figure tagged by model, user, and arbitrary metadata, and exports to your warehouse or observability stack. Aggregate it to a weekly total per cost center and you have the only input a forecaster needs: a regular, labeled time series of spend.

The forecast is only as good as the tagging discipline underneath it, so this step is more operational than it looks. The gateway will faithfully record whatever metadata your applications send it — which means the time series is only as clean as that instrumentation. Before training, a team needs stable metadata keys and consistent team-to-cost-center mappings, a way to keep model prices current as providers change them, and an explicit policy for the awkward records: late or missing data, retries, fallbacks, and cached responses that cost little or nothing. Normalizing pricing, de-duplicating, and aligning timestamps to a single timezone is unglamorous, but it is the difference between a forecast and a confident-looking artifact built on noise.

That said, this is still the part teams without a gateway cannot do at all. If your spend is scattered across raw provider invoices, you can reconstruct a company-level monthly total, but you cannot get a clean weekly series per team with the causal context attached — and per-team, context-rich series are what make forecasting useful rather than decorative. The gateway is not just a cost-control point; it is the instrument that makes the spend forecastable in the first place.

Le moyen le plus rapide de créer, de gérer et de faire évoluer votre IA

INSCRIVEZ-VOUS
Table des matières

Gouvernez, déployez et suivez l'IA dans votre propre infrastructure

Réservez un séjour de 30 minutes avec notre Expert en IA

Réservez une démo

Le moyen le plus rapide de créer, de gérer et de faire évoluer votre IA

Démo du livre
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Découvrez-en plus

Aucun article n'a été trouvé.
June 23, 2026
|
5 min de lecture

Série Agent Gateway (partie 2 de 7) | Registre de services pour l'ère agentique

Aucun article n'a été trouvé.
June 23, 2026
|
5 min de lecture

Seeing the Bill Before It Lands: Forecasting Enterprise AI Spend

Aucun article n'a été trouvé.
June 9, 2026
|
5 min de lecture

Comprendre la tarification de LiteLM pour 2026

Aucun article n'a été trouvé.
June 22, 2026
|
5 min de lecture

MCP Apps and Tasks: Governing the New First-Class MCP Extensions

Aucun article n'a été trouvé.
Aucun article n'a été trouvé.

Blogs récents

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.
Faites un rapide tour d'horizon des produits
Commencer la visite guidée du produit
Visite guidée du produit