Skip to main content

warpllm

A warp-speed, robust AI gateway written for rust, node, and python applications - built for planet scale by the community.

Docs Discord Reddit

CI crates.io PyPI npm License

Quickstart

pip install warpllm              # python
npm install @warpllm/warpllm     # node
cargo add warpllm                # rust
export OPENAI_API_KEY=sk-...

Python

from warpllm import WarpLLM

client = WarpLLM()

completion = client.chat_completions({
    "model": "openai/gpt-5-nano",
    "messages": [{"role": "user", "content": "Hello!"}],
})

print(completion["choices"][0]["message"]["content"])

Node

import { WarpLLM } from '@warpllm/warpllm'

const client = new WarpLLM()

const completion = await client.chatCompletions({
  model: 'openai/gpt-5-nano',
  messages: [{ role: 'user', content: 'Hello!' }],
})

console.log(completion.choices[0].message.content)

Rust — chat_completions is async and warpllm ships no runtime, so bring your own: cargo add tokio --features macros,rt-multi-thread.

use warpllm::{ChatCompletionRequestMessage, Client, ClientConfig, CreateChatCompletionRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new(ClientConfig::default())?;

    let completion = client
        .chat_completions(CreateChatCompletionRequest {
            model: "openai/gpt-5-nano".to_string(),
            messages: vec![ChatCompletionRequestMessage {
                role: "user".to_string(),
                content: "Hello!".to_string(),
                ..Default::default()
            }],
            ..Default::default()
        })
        .await?;

    let content = completion.choices[0].message.content.as_deref();
    println!("{}", content.unwrap_or_default());
    Ok(())
}

Switching providers is a string change

Keys are read from the environment when the client is built, so export the one the provider needs and change the model string. Nothing else moves.

Model string Key it needs
openai/gpt-5-nano OPENAI_API_KEY
deepseek/deepseek-v4-flash DEEPSEEK_API_KEY
kimi/kimi-k3 MOONSHOT_API_KEY
opencode/glm-5.2 OPENCODE_API_KEY
openrouter/anthropic/claude-sonnet-4 OPENROUTER_API_KEY

The provider/ prefix is required. warpllm matches the whole string against its roster, so a bare gpt-5-nano — or any name it doesn't know — is an error rather than a guess at an upstream default.

Narrowing a client to the providers it serves

By default a client serves the whole roster and reads every provider's variable. Declare the ones you mean and it reads no others, routes to no others, and takes a key directly for the callers who keep theirs somewhere the environment can't reach:

WarpLLM(providers={"openai": {}, "deepseek": {"api_key": "sk-..."}})
new WarpLLM({ providers: { openai: {}, deepseek: { apiKey: 'sk-...' } } })
ClientConfig {
    providers: Some(BTreeMap::from([
        ("openai".into(), ProviderConfig::default()),
        ("deepseek".into(), ProviderConfig { api_key: Some(key) }),
    ])),
    ..Default::default()
}

An empty entry means "serve this one, key from the environment". A request for a model under a provider you didn't declare is refused before any upstream call, and a provider name the roster doesn't hold fails when the client is built.

Runnable versions of all three, with comments, are in examples/.

Your own models

Anything that speaks the OpenAI API — vLLM, TGI, Ollama, llama.cpp — is a routing target. Describe it in a file and hand warpllm the path:

# ./warpllm.yaml
providers:
  local:
    base_url: "http://localhost:8000/v1"
    auth: none                       # the box is on a private network
    models:
      local/llama-3.3-70b:
        supported_apis:
          - {api: openai_compat_chat_completions}
          - {api: openai_compat_chat_completions_stream}
client = WarpLLM(specs_path="./warpllm.yaml")
client.chat_completions({"model": "local/llama-3.3-70b", "messages": [...]})
const client = new WarpLLM({ specsPath: './warpllm.yaml' })
let client = Client::new(ClientConfig {
    specs_path: Some("./warpllm.yaml".into()),
    ..Default::default()
})?;
warpllm-server --specs ./warpllm.yaml   # or WARPLLM_SPECS=./warpllm.yaml

Your file is merged over the built-in roster, so adding local/ leaves openai/ exactly where it was — the same client routes both. Reusing a built-in provider's name replaces that provider whole, and warpllm warns rather than shadowing it quietly. The warning goes through tracing, which warpllm-server surfaces and a Rust client does once it installs a subscriber; the Python and Node bindings install none yet, so there it goes nowhere. Same for the older warning about an environment with no provider keys in it.

auth: none is the line that matters for a private box: warpllm then sends no Authorization header at all. Omitting it means something else — that the roster records no way to authenticate this provider — so a forgotten env_api_key on a paid provider fails locally instead of leaving without a credential.

The file is read when the client is built, so a roster that can't be used is an error there, naming the path — not a request failing hours later. There is no wildcard: every model gets an entry, because supported_apis and capabilities are per model and a pattern would have to claim both on behalf of models nobody listed.

The schema is documented in full at the top of specs.yaml, and examples/warpllm.yaml is a worked one covering vLLM, Ollama, and a cluster that does want a key.

Mission

This project is to lay out the most resilient open source productionization layer for AI-deployments. Designed for you if you want:

  1. To work with multiple AI providers or your own models.
  2. To keep your AI services up and running with 0 downtime.
  3. Speed (minimal overhead latency).
  4. A granular view of your metrics (uptime, P95 latency, costs, etc).
  5. Control over:
    1. Where your data goes.
    2. Your AI budget across providers.

Status

Released (0.6.1) On main
OpenAI chat completions, non-streaming Yes Yes
provider/model routing strings Provider registry Provider registry
DeepSeek, OpenRouter Yes Yes
Kimi Yes Yes
Mistral Yes Yes
Claude, over Anthropic's own protocol Yes Yes
OpenCode Zen Yes Yes
Declaring the providers a client serves Yes Yes
Self-hosted models via your own roster file Yes Yes
OpenAI-compatible HTTP gateway — Unreleased
Streaming Yes Yes
Weighted load balancing Rust only Rust only
Per-request failover Yes Yes
Caching, metrics — —

Unlisted models are rejected rather than guessed at, so routing a name warpllm doesn't know is an error, not a surprise upstream bill.

Layers

  1. An SDK - provide a request and we translate it to work with different providers and models out of box.
  2. [Unreleased] A proxy - run a self-hosted proxy that speaks the OpenAI API:
    1. [Coming Soon] Failover - define multiple models to handle outages / errors
    2. [Coming Soon] Load Balancing - define a % of requests to be handled per model
    3. [Coming Soon] Prompt Response Caching - define a TTL and avoid paying twice for the same prompt

Key focus points

  1. Native SDK support - Written once in rust, compiled for maximum performance, available for rust/typescript/python.
  2. Self hostable - Avoid vendor lock-in (e.g. from cloud provider or model provider), or data leaving your infra.
  3. Warp-speed execution - What we named ourselves after. Machine level code, faster than a typescript or python native library.
  4. Compact file size - Pre-compiled into binary format, not verbose text files.

Partners

Tempest

Tempest - run Claude Code, Codex, Gemini and other CLI agents in parallel, with up to 86% fewer tokens and 92% fewer tool calls. Agent orchestration on the desktop, model routing in the runtime - the same refusal to be locked to one vendor, one layer apart.

Roadmap

The roadmap lives in GitHub issues — one issue per item, so direction is discussed where the work happens. Add a comment if you see something missing, or if something there matters enough to you that it should move up.

Contributing

We're excited to have you join us. See the contribution guide for how to get started.

A big thank you to the contributors below who have helped build this AI gateway to this point!

License

The warpllm core is open source under the Apache License 2.0.

Metadata

Release files for warpllm 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for warpllm 0.6.1
File Size Uploaded
warpllm-0.6.1.tar.gz 490.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for warpllm 0.6.1
File
warpllm-0.6.1-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details
warpllm-0.6.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
warpllm-0.6.1-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
warpllm-0.6.1-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
warpllm-0.6.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
warpllm-0.6.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
warpllm-0.6.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
warpllm-0.6.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 27.1 MB

Release files / warpllm-0.6.1.tar.gz

Download URL warpllm-0.6.1.tar.gz
Size 490.1 kB
Tags Source
SHA-256 checksum
How to use checksums
efbe805c6ff572fadd4c94b4e8d644e2be250b79293207b5efec3d1e8edcdddb
BLAKE2b-256 checksum
How to use checksums
799b520d40e80340cf0fad58c174a22f3b9e3090d4da6362d74667349befc6b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-win_arm64.whl

Download URL warpllm-0.6.1-cp310-abi3-win_arm64.whl
Size 3.2 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
57c81e7affbdbdf3f1c9684b461ddcc2630588edbeac0f372fd2e7a7543c48a1
BLAKE2b-256 checksum
How to use checksums
0a67be75a83108c592286d01df0c4a86b104c89aa0726bce88c6ea14052841c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-win_amd64.whl

Download URL warpllm-0.6.1-cp310-abi3-win_amd64.whl
Size 3.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
557b73a34e5ec453bcaaa116c71d62207611622ed6e789e7c8a037558f5e0370
BLAKE2b-256 checksum
How to use checksums
e2bb4bb700c47cad624c4b4e25d2271cb0d4293f5865cf90f65341d427630a17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL warpllm-0.6.1-cp310-abi3-musllinux_1_2_x86_64.whl
Size 3.6 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
c081e515ea34220b048100047302914bb428c1e6953f56ebb8023c76342d9901
BLAKE2b-256 checksum
How to use checksums
c9293e8a0572e192e15c9e1b756c9941af358726475670c0eb3f7b7939d564af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL warpllm-0.6.1-cp310-abi3-musllinux_1_2_aarch64.whl
Size 3.4 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
3e613e08a6c542ac2e3dff8b3f3c4d5c7282693082fe2013dd489d493907a1d5
BLAKE2b-256 checksum
How to use checksums
18808a98380958714fe34ef8c0a476aa463060bea1b5e9a33a48d5fbfd174ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL warpllm-0.6.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3fe1b3b8dc705585e41722fbb740ff5dd0e58d46e3e2e0bd4978b38635e5146f
BLAKE2b-256 checksum
How to use checksums
8fcd77889e697f19cc50b677465f293f8ed7b115acf7d102922b130466aacc21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL warpllm-0.6.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.2 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
bb6b8a0dffd0d818c1b38c6b10dacd6caea6a21855346e5498ee6455eb2c9ff5
BLAKE2b-256 checksum
How to use checksums
c474d78db80383a8a3a59b1fc572a79fbfdd6342ea2efc8ce4ededeb09f39112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL warpllm-0.6.1-cp310-abi3-macosx_11_0_arm64.whl
Size 3.1 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
69228128fc513b3b65824b0b08a51f3636e9534d64f8584305d39b2a2eb847a6
BLAKE2b-256 checksum
How to use checksums
528e4f563bb02f762fdaf30f280cf217782b3622c9dc742da10bcd51675deceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / warpllm-0.6.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL warpllm-0.6.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8e688d81c72785bcf3537b81c12fd75c65f28b074cbef211320a7af514ad9ed1
BLAKE2b-256 checksum
How to use checksums
f1d0692d05b7cb294984b48a8230ee54d27cf0f44e2d7b84a432b408be7da026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.1 This release

9 release files

0.6.0

9 release files

0.5.0

9 release files

0.4.0

9 release files

0.3.1

9 release files

0.3.0

9 release files

0.2.0

9 release files

0.1.4

9 release files

0.1.3

9 release files

0.1.2

9 release files

0.1.0

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page