Wire SavingsTracker + Extend Anomaly Scoring to API Key Callers

2026-03-17

savings-trackeranomaly-enginemodel-router

What We Built

Wired the orphaned SavingsTracker into the model router pipeline. After every intelligent routing decision (bandit, cascade, cost-optimizer, auto-select), the tracker records the counterfactual savings — what the request would have cost with the default model. Extended anomaly scoring from mTLS-only to all callers including API key users, using apikey:{id} as the caller identity.

Lockstep Checklist

  • [x] API Routes: No new endpoints (response headers only).
  • [x] TS SDK: No changes needed.
  • [x] Python SDK: No changes needed.
  • [x] MCP Schemas: No changes needed.
  • [x] Master Record: N/A — intelligence wiring.