Skip to content
← All work
AI infrastructureProduction

AI gateway.

Shared model access with usage tracked per consumer.

I took a colleague’s LiteLLM setup in dev and made it a shared gateway for our AI features and engineering tools. I deployed it on a dedicated platform cluster, migrated the consumers and added scoped access and usage tracking.

My role
Deployed the gateway and integrated its consumers
Context
Loweconex
Built with
LiteLLM · Kubernetes · AWS · Grafana · ArgoCD

01

Managing access across several AI features

Our early AI features kept provider keys in their own configuration. As more services and tools needed models, we needed a common way to manage access, select models and attribute usage.

02

Keys, model aliases and usage records

Each workload calls the shared endpoint with a scoped virtual key and a model alias. The gateway holds the model catalogue. Clarity tags usage by customer, environment and feature; Nightshift adds its workflow and run ID.

LiteLLM provides the proxy. My work covered deployment, consumer migration, access configuration and the records needed to trace a model call back to its source.

03

Access and budget limits

A key can only use its permitted models. A request for an unapproved model returns an error, even if that model is deployed at the gateway.

The gateway enforces budgets and rate limits alongside each application’s own controls. Concurrent requests and delayed usage records can overshoot a budget threshold, so application limits remain necessary.

04

The services using it

Clarity, Nightshift and automated pull-request review use the gateway. I also integrated the reviewer into the shared delivery pipeline. Its feedback is advisory; an unavailable reviewer does not block a build.

Our spend dashboard once made the gateway look more expensive than it was. The token counts were fine; the price variables referred to a different model. That is one of the less glamorous parts of running the gateway: checking that the cost figures match what we are actually calling.

Demo

Try an example.

This example uses sample data. It is not connected to customer systems.

consumer key
requested model

Key issued, allowlist never populated. This is the trap.

authenticate virtual key
model in gateway config
model on this key's allowlist
stamp attribution
route to provider
write spend log
Keep exploring

Nightshift

Engineering agents for tickets, reviews and incidents.

What’s next?

Let’s talk about
what’s next.

I’m open to roles in platform engineering, developer tools and AI infrastructure.
Remote-first, open to relocating, and no sponsorship needed.

Get in touch