Forecast AI inference economics
Forecast full AI-inference cost, retry demand, terminal-failure loss, gross value and economic-loss VaR/CVaR with tenant-local Gamma-Poisson, Beta-Binomial and partially pooled lognormal models plus shared provider-outage scenarios.
What it's for
Turns AI usage into board-grade unit economics and correlated vendor-risk exposure, including retries, token variability, outages, value creation and downside—not merely a token-cost dashboard.
What you give it
Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| current_routes | array of objects (11 fields) | Evidence | Yes |
| demand_prior_exposure_units | number > 0 | Your calibration | Optional |
| historical_usage_periods | array of objects (9 fields) | Evidence | Yes |
| horizon_periods | integer ≥ 1, ≤ 120 | Your calibration | Optional |
| max_detail_rows | integer ≥ 1, ≤ 500 | Numerical control | Optional |
| minimum_historical_periods | integer ≥ 1 | Your calibration | Optional |
| minimum_nonzero_unit_periods | integer ≥ 1 | Your calibration | Optional |
| reliability_prior_failures | number > 0 | Your calibration | Optional |
| reliability_prior_successes | number > 0 | Your calibration | Optional |
| scenarios | array of objects (11 fields) | Evidence | Yes |
| seed | integer ≥ 0 | Numerical control | Optional |
| simulations | integer ≥ 100, ≤ 100000 | Numerical control | Optional |
| tail_probability | number ≥ 0.001, ≤ 0.5 | Your calibration | Optional |
| unit_prior_strength | number > 0 | Your calibration | Optional |
Each current_routes
record
| Field | Type | Required |
|---|---|---|
| evidence_verified | boolean | Yes |
| fixed_cost_per_period | number (≥ 0) | Yes |
| forecast_exposure_units | number (≥ 0) | Yes |
| id | string (non-empty) | Yes |
| input_price_per_million_units | number (≥ 0) | Yes |
| loss_per_terminal_failure | number (≥ 0) | Yes |
| maximum_attempts | integer (≥ 1, ≤ 100) | Yes |
| output_price_per_million_units | number (≥ 0) | Yes |
| provider_id | string (non-empty) | Yes |
| value_per_success | number (≥ 0) | Yes |
| workload_class | string (non-empty) | Yes |
{
"current_routes": [
{
"evidence_verified": true,
"fixed_cost_per_period": 1,
"forecast_exposure_units": 10,
"id": "support-route",
"input_price_per_million_units": 2,
"loss_per_terminal_failure": 20,
"maximum_attempts": 3,
"output_price_per_million_units": 4,
"provider_id": "provider-a",
"value_per_success": 1,
"workload_class": "support"
}
],
"historical_usage_periods": [
{
"evidence_verified": true,
"exposure_units": 10,
"id": "support-0",
"input_units": 0,
"output_units": 0,
"request_count": 0,
"retried_request_count": 0,
"terminal_failure_count": 0,
"workload_class": "support"
},
{
"evidence_verified": true,
"exposure_units": 10,
"id": "support-1",
"input_units": 2100,
"output_units": 1050,
"request_count": 21,
"retried_request_count": 2,
"terminal_failure_count": 1,
"workload_class": "support"
},
{
"evidence_verified": true,
"exposure_units": 10,
"id": "support-2",
"input_units": 2200, Truncated for display — the full payload is 185 lines.
What you get back
This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.
{
"assumptions": [
"Usage history includes zero-request periods at a stable workload-class and exposure-unit grain; retry and terminal-failure counts are prospective runtime facts, and input/output units use the same tokenizer/accounting perimeter as prices.",
"Gamma-Poisson, Beta-Binomial and lognormal parameters pool only within this tenant. One provider outage state is shared by every route using that provider, preserving common-mode dependence that independent endpoint simulations would hide.",
"Gross value per successful request and terminal failure loss are finance-owned, non-overlapping economic definitions; token or request savings alone are not value and fixed, retry and failure costs remain visible.",
"This is conditional aggregate planning, not a vendor SLA, guaranteed bill, model-quality proof, procurement decision, data-transfer authorization or judgment about a provider, team or person."
],
"configuration": {
"cost_rule": "billable_attempt_input_output_fixed_and_retry_costs_before_failure_loss",
"demand_prior_exposure_units": 20,
"horizon_periods": 1,
"minimum_historical_periods": 10,
"minimum_nonzero_unit_periods": 5,
"provider_dependence_rule": "one_outage_state_per_provider_and_simulation_shared_by_every_route",
"reliability_prior_failures": 2,
"reliability_prior_successes": 2,
"seed": 23,
"simulations": 200,
"tail_probability": 0.1,
"unit_prior_strength": 5
},
"decision": "ai_inference_economics_forecast_supported",
"failed_gates": [],
"method": "empirical_bayes_inference_demand_units_reliability_and_shared_provider_outage_forecast_v1",
"provider_diagnostics": [
{
"provider_id": "provider-a",
"route_count": 1,
"simulated_outage_fraction": 0.055
}
],
"route_diagnostics": [
{
"expected_gross_value": 21.6805,
"expected_inference_cost": 1.0122,
"expected_requests": 25.24,
"expected_terminal_failure_loss": 80.4,
"provider_id": "provider-a",
"route_id": "support-route",
"workload_class": "support"
}
],
"scenario_diagnostics": [
{ Truncated for display — the full payload is 85 lines.
How it works
Forecasting & survival — Estimate when something completes or fails, with censoring and unresolved work handled honestly rather than dropped.
- 1 Build complete zero-inclusive tenant history by stable workload class and exposure unit; estimate partially pooled request, retry, terminal-failure and input/output-unit distributions.
- 2 Draw coherent business scenarios and one outage state per provider shared by every route, then simulate truncated retries, billable attempts, token units, fixed charges, successful value and terminal loss.
- 3 Return route, provider, class and scenario diagnostics plus expected net value and economic-loss VaR/CVaR; mark output diagnostic-only when history or evidence support is insufficient.
Before you trust it
Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.
Assumptions & guardrails
- Training examples precede their outcomes, censoring and unresolved work are represented, and deployment populations remain comparable to validation cohorts.
- Usage periods include true zeros at a stable exposure grain; tokenizer and price units align; routes describe separate traffic exposure; provider outage identity captures common infrastructure; value and failure loss do not overlap.
- A predictive interval or risk estimate is not a deadline promise, causal explanation, or individual-performance judgment.
- The forecast is a conditional planning distribution, not a vendor bill or SLA, causal quality comparison, procurement recommendation, data-transfer authorization or judgment about a provider, team or person.
Minimum evidence
- historical_usage_periods: required and organization-defined
- current_routes: required and organization-defined
- scenarios: required and organization-defined
How to validate it
Use chronological train/calibration/test windows, compare proper scores and decision value with a simple baseline, and recalibrate only from outcomes resolved after prediction time.
Calibrating it to your org
Same for everyone
The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.
Specific to you
- tenant-local period projection from gateway requests and billing usage, retaining zero periods and joining tokenizer-aligned input/output units, retry and terminal status to the price and route epoch known before forecast time
- workload and exposure grain, zero-period completeness, tokenizer/accounting perimeter, retry and terminal-failure definitions, provider common-mode identity, price/currency/horizon, gross-value/direct-loss separation, priors, minimum support, scenario dependence and tail appetite
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
- 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
- 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.
Call it from your AI
You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.
gitrevio_capabilities_search
{ "q": "forecast full aiinference cost retry demand" }
→ finds "forecast_ai_inference_economics"
gitrevio_capability_describe
{ "capability_id": "forecast_ai_inference_economics" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "forecast_ai_inference_economics", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.
Related tools
Audit AI model routing evidence integrity
Audit every live AI-model route against current version-matched local evaluation, uncontaminated temporal holdout, pricing freshness, residency, retention, reliability and genuinely independent provider fallback evidence, counting each workload's value at risk once.
Optimize AI model routing portfolio
Choose one evidenced AI-model route per workload on a value/CVaR Pareto frontier under hard privacy, residency, retention, quality, latency, endpoint-capacity, route-availability, provider-diversity, concentration, budget and dependency constraints.
Audit AI capability fallback integrity
Prove that every aggregate capability required when AI is unavailable has a current approved runbook and a sufficiently large, timely, successful, independently observed exercise conducted with AI actually disabled.
Audit AI code change evidence integrity
Prove that aggregate AI-assisted coding evidence comes from prospectively registered, nonoverlapping treatment/control studies with immutable assignment, configuration, trace and mature-outcome denominators before anyone estimates an effect.
Audit AI inference cost allocation integrity
Reconcile provider AI invoices bottom-up to workload and route usage, price terms, cached requests, retries, fixed charges and credits without combining currencies or silently allocating unexplained spend.
Audit AI knowledge grounding integrity
Audit the complete AI knowledge supply chain from immutable source versions through indexed chunks and effective access policy to retrieved evidence, claim-level citations and honestly mature grounding outcomes, without treating unresolved answers as failures.