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.

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)

Rustchat_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
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.

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

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

[!IMPORTANT] The published packages are 0.3.1, which adds streaming — from the Rust core, both SDKs, and the HTTP gateway — alongside the Kimi provider and the rest of OpenAI's chat-completion roster. It is a breaking release: response fields that are optional and nullable now tell an absent key from an explicit null, so their type changed in all three languages. See the changelog before upgrading from 0.2.x.

The OpenAI-compatible HTTP gateway has landed on main but is not released yet.

Released (0.3.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
OpenAI-compatible HTTP gateway Unreleased
Streaming Yes Yes
Failover, load balancing, 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.

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.

Release files for warpllm 0.3.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.3.1
File Size Uploaded
warpllm-0.3.1.tar.gz 243.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for warpllm 0.3.1
File
warpllm-0.3.1-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details
warpllm-0.3.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
warpllm-0.3.1-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
warpllm-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
warpllm-0.3.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.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
warpllm-0.3.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
warpllm-0.3.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size:19.0 MB

Release files / warpllm-0.3.1.tar.gz

Download URL warpllm-0.3.1.tar.gz
Size 243.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f31021bffcdb9d551452edb1b450a645312931bf8fe6749ddb99bc410102fefe
BLAKE2b-256 checksum
How to use checksums
4bc27f3b93e4ec4956e98c11c404bf00168dd6861e74b73753e0d757749e8b91
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-win_arm64.whl
Size 2.3 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
6b0b4e2b00b343e596e6063c5e37871fa17ab30da77d9bd54cd3ea8a95e3997d
BLAKE2b-256 checksum
How to use checksums
430ec0c8546eab01edc447fc0ac6e31a39fa4f5ae2a67ccfef6e0be4add2bb3c
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e63f58d80361070c0225be65b6452d74b3bbbf14ed6a3337a657437cc27a865d
BLAKE2b-256 checksum
How to use checksums
c5b67ea6069beb47aba670a04e03cce726a1f01891dadb4fcaa852acb3bba232
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b6ad35f07fdd932c90d530b68f04b843bc8c37a6cbf67c9a3b0e05921c1ba873
BLAKE2b-256 checksum
How to use checksums
77d3a65f95e362b449b19905855c3a19a12442c107cb733bf438b3325469c1bf
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl
Size 2.5 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
beb66c7200c7ec2e345db27f243038002f4cab79388502bc29a9d9860219c6f5
BLAKE2b-256 checksum
How to use checksums
4b0d98670ec6d7dcb70fd977eb0c8f0ca1db33ed8dd2881749f59200b42ae622
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f72f1d7a4546bee7c3f85ae937f1138953319e805a78db4fcee57f9f24ef36e9
BLAKE2b-256 checksum
How to use checksums
121626f7592e8a40e6b8477631aea0065caf2c4100a455e64484bc890b7a3192
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.3 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
c06cf93864cbd1f83a7ff5ee776234a8bc7188f76017fe9fb5c13de000e306df
BLAKE2b-256 checksum
How to use checksums
10e215c06b9225cf0dacdbad99cd637e01366a9dab8b80792163104a066f51b2
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d82b809f579139114ca13111eca7e25f6f4d544c175ebccc88debbaa47609321
BLAKE2b-256 checksum
How to use checksums
85e2d18665f5245948e2ba6a91d80f52d75c7444b30011550cd42cb05815001b
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 Aug 13, 2026.

Transparency log

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

Download URL warpllm-0.3.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ed43b4abeb6dd3ec820c16d1d88b8d85f25353549ee8ab8ad658a68936644d14
BLAKE2b-256 checksum
How to use checksums
a4719e5c1728a8a77f8d8831a886610f3194c992c8c8e958960e1140b08e613e
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 Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

9 release files

0.4.0

9 release files

This release

0.3.1 This release

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