Zum Inhalt springen
Mohammad M. Khani

aim2balance model gateway

Rolle
AI Engineer
Jahr
2026

Stack

LiteLLMPythonFastAPIPostgreSQLDocker
LiteLLM gateway console with routing, guardrails and usage sections

Three EU providers, three APIs, three pricing schemes — and a product that has to bill in one currency and keep working when one of them is down.

Vorgehen

  1. 01Put LiteLLM in front of all three behind a single OpenAI-compatible endpoint, so the product codes against one API.
  2. 02Set routing and fallback so a provider outage moves traffic instead of returning an error.
  3. 03Normalised each provider's token price into one internal cost unit, which is what makes a single wallet possible without a per-model rate table.
  4. 04Metered energy and water per request at the gateway, where every call already passes through.

Ergebnis

One endpoint served the platform, the apps and the extension, with per-request cost and environmental figures recorded at the boundary.

3EU model providers