DEV Community
•
2026-08-14 05:18
Your LLM gateway takes a cut. Seventeen lines of Python tell you how big.
You wanted to try three models from three vendors, so you did the sensible thing: pointed one client at a gateway, put one key in the environment, and stopped thinking about it. A gateway here is a service that speaks the OpenAI API and forwards your requests to Anthropic, Google, OpenAI, xAI and the rest, so switching models is a string change instead of a new SDK.
What almost nobody checks afte...