All Questions
Llm Gateway Cost And Caching medium

The monthly LLM bill tripled, and finance asks which tenant and which feature caused it. The gateway currently logs only the model name and total tokens per day, and all traffic uses one provider API key. What is the right fix?

  1. A Split the invoice by each tenant's share of HTTP requests through the gateway, which closely approximates their token spend.
  2. B Rely on the provider's usage dashboard for the API key, since it already records spend by tenant and feature automatically.
  3. C Require tenant and feature tags on every call and log input, output, and cached tokens per call with the model used.
  4. D Sample 1% of requests for full logging, since per-call metadata on every request adds too much gateway latency.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions