Skip to main content
1

Install the package

Requirements: Python 3.10+, Node 20+, or Rust 1.85+. See Installation for platform details.
2

Export a provider key

warpllm reads keys from the environment at request time. Export the one belonging to the provider you are about to route to.
Every provider and its variable is listed in Authentication.
3

Send a chat completion

The model string is provider/model. The provider/ prefix is required.
warpllm ships no async runtime, so a Rust caller brings one: cargo add tokio --features macros,rt-multi-thread.
4

Switch providers by changing the string

Nothing else in the call moves. Export the new provider’s key and change the model:

Runnable examples

The repository carries a commented, runnable version of each snippet above in examples/, along with an .env.example template for the provider keys.

Next steps

Stream a reply

Set stream: true and iterate chunks in any of the three languages.

Handle failures

One error taxonomy across every provider, in OpenAI’s vocabulary.

Browse the model roster

Every routable model, its context window, and its output ceiling.

Run the gateway

Keep your existing OpenAI client and change only its base URL.