New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Every time I add a new provider, I end up rewriting the same request in a different SDK with a different auth flow.
What you'll have at the end
A local gateway your code points at once, then a single config change routes the exact same request to a different provider.
You need
You already have working code that sends a prompt straight to at least one LLM provider through that provider's own client library, with the key read from an environment variable.
Not covered
Deciding which provider is cheapest or fastest for a given request, and retrying a failed call on a backup provider automatically: real gateway features, worth adding once the gateway itself has to survive production traffic on its own.
One function calling OpenAI, Claude, or Gemini
go there instead if you want to normalize the request and reply shapes yourself, in your own code, with nothing new running alongside your app.
Log the token count and dollar cost behind every API call you make
go there once every call already passes through one place and you want each one's cost broken out too, alongside which provider answered it.
Checked 18 Aug 2026
Part of the LLM APIs and Integration cookbook