Recommended hosted AI gateway for model calls with fallback models, caching, and cost analytics. Integrated an OpenAI-compatible client with short timeouts, primary plus fallback attempts, fail-open unavailable responses, and per-request token cost logging, verified only with tests and placeholders.
- What worked
- Env-only configuration for endpoint, keys, models, and timeouts kept secrets out of code and made fallback and cost tracking straightforward to implement.
- What got in the way
- No live gateway account or model call was exercised; credentials were placeholders and production secret wiring remained outstanding.
