Model Cost & Quota Governance
Executive Summary
This sub-scenario focuses on centralized governance of model and external platform usage, cost, quotas, and health signals, ensuring transparent and controllable call costs with anomaly alerts within 5 minutes and automatic throttling, degradation, or shutdown triggers.
Scope & Guardrails
- In Scope: Usage metering, cost aggregation, quota strategy, anomaly detection, alerts, reports, runbooks.
- Out of Scope: Financial settlement process, contract management, business pricing strategy.
- Environment & Flags:
provider-cost-guard,quota-enforcer; depends on Cost Warehouse, Quota Service, Telemetry.
Participants & Responsibilities
| Scope | Repository | Layer | Responsibilities & Deliverables | Owners |
|---|---|---|---|---|
| cost-metering | powerx | ops | Token/Call metering, cost calculation, data persistence | Ops Reliability Center |
| quota-service | powerx | ops | Quota configuration, throttling, shutdown strategy | Agent Platform Guild |
| observability | powerx | ops | Metrics, reports, runbooks | Ops Reliability Center |
End-to-End Flow
- Collect call metering and calculate cost → 2. Compare with tenant/project quotas, trigger alerts or throttling when exceeding thresholds → 3. Push metrics to dashboards, generate reports → 4. If anomalies occur, execute degradation/shutdown and record audit logs.
Key Interactions & Contracts
POST /internal/provider-usage/report,GET /internal/provider-quotas,POST /internal/provider-quotas/enforce,EVENT agent.provider.cost.anomaly.- Configuration:
config/cost/provider_rates.yaml,config/quotas/model_usage.yaml.
Acceptance Criteria
- Cost data latency <1 minute; quota exceeded alerts delivered within 5 minutes; throttling/shutdown operations 100% audited; degradation strategy effective within 2 minutes.
Telemetry & Ops
- Metrics:
agent.provider.cost_total,agent.provider.quota_usage,agent.provider.alert_total,agent.provider.degrade_total. - Alerts: Cost spikes, quota exceeded, degradation failures.
References
docs/meta/scenarios/powerx/agent-and-automation/agent-model-platform/primary.mdscripts/qa/provider-drill.mjs
