The problem
As more applications adopt LLMs, each team needs to manage provider access, fallback behavior, and usage. A shared gateway makes it possible to define common rules and trace individual requests without rebuilding those controls in every application.
My role
I designed and implemented gateway components covering application access, routing policy, and usage attribution. I also worked on the integration between the gateway and the layer that checks whether an external route is allowed.
Design decisions
- Put policy before provider selection. The gateway decides which routes a request can use before picking a provider. That decision stays in force if the preferred route fails.
- Attribute usage at the gateway. Shared services can use one integration while still assigning traffic and spend to the appropriate user or team.
- Record the routing decision. Operations teams need to understand which route was selected and why a fallback occurred, especially when comparing latency and cost.
How I evaluated it
The checks covered permitted requests, requests subject to stricter policy, unavailable model routes, and usage attribution. Ordinary traffic alone would miss regressions in fallback behavior or policy enforcement.