respan-gateway
App New
An LLM gateway with a neutral core and compiled-in plugins.
- Downloads
- 36
- Dependents
- Not applicable
- Stars
- 630
- Forks
- 98
- Contributors
- 18
- Commits
- 476
- Latest release
- 0.3.0 ·
About
The universal adapter for AI.
Respan Gateway is a single Rust binary that sits between your code and every AI API. Point the SDK you already use at it, and it connects you to everything: chat models, images, video and voice from every major provider; tools for any model, from web search and memory to code sandboxes and any MCP server; and traffic control (format translation, fallback, retries and hedged requests), with a live log of every call. ▶ Watch the demo

Read the full README
Key features
Any client, any model
OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Gemini API clients can all call any model, with streaming, tools, images and reasoning translated.Multimodal
Realtime voice across vendors (an OpenAI Realtime client talks to Gemini Live, and back), plus images, speech, transcription, embeddings and video through OpenAI's or Gemini's APIs, to any vendor that has them.MCP tools for every model
Put MCP servers or built-in tool vendors behind the gateway, from web search to code sandboxes. It runs their tools inside chat requests, so a plain chat call can use them, whatever the client or model.Traffic control
Named routes, globs andprovider/model; fallback, retries, cheapest or fastest; and hedged requests that race a slow call against a second provider.Observability
A live request log with cost, latency and tokens for every call, and traces in Respan, where span-02 analyzes how your agents behave.Best-in-class performance
0.07 ms of added latency, 56,000 requests per second and 31 MB of memory in our benchmarks: about 3× the throughput of the next fastest gateway we tested.Write your own plugin in minutes
Every feature above is a plugin, built on the same public Rust API you can use: one trait with four hooks. Start from the plugin guide or an example such as guardrails, PII masking or billing.
Quickstart
1. Install
pip install respan-gateway
Or cargo install respan-gateway, or a
GitHub release.
2. Run it with your keys
export OPENAI_API_KEY=sk-...
respan-gateway
No config file needed: every vendor whose key is set becomes a provider.
3. Call any model from any SDK
from anthropic import Anthropic
client = Anthropic(base_url="http://localhost:8080", api_key="unused")
reply = client.messages.create(
model="gpt-6-luna", max_tokens=256,
messages=[{"role": "user", "content": "Hello from the Anthropic SDK"}])
print(reply.content[0].text)
The web UI is at localhost:8080/ui/. Next: configuration and MCP tools.
Other ways to run it
- Python, in-process — Run the gateway inside your Python app, with no server.
- Embed in Rust — Mount the gateway in your own Rust service.
- Docker —
docker run -p 8080:8080 -e OPENAI_API_KEY -e RESPAN_CLIENT_KEYS=<a key of yours> ghcr.io/respanai/respan-gatewayon any container host; listening beyond localhost, it needs a client key.
Performance
| Respan Gateway | Bifrost | Portkey | LiteLLM (1 worker) | |
|---|---|---|---|---|
| Added latency (p50) | 0.07 ms | 0.16 ms | 0.17 ms | 4.34 ms |
| Throughput | 56,734/s | 18,182/s | 4,187/s | 268/s |
| Memory | 31 MB | 488 MB | 350 MB | 418 MB |
| 1k streams, success | 100% | 92–100% | — | 79% |
| 1k streams, memory | 128 MB | 688 MB | — | 493 MB |
| p99, 5% slow calls | 105 ms | 2,002 ms | 2,003 ms | 2,024 ms |
Configuration
You don't need a config file to start. When you want more, run
respan-gateway init for a commented gateway.toml. One file sets up keys,
providers, traffic control, tools and tracing:
client_keys = [{ name = "app", key = "env:APP_KEY" }] # who may call the gateway
[providers.openai] # a built-in vendor: just add a key
vendor = "openai"
key = "env:OPENAI_API_KEY"
[providers.anthropic]
vendor = "anthropic"
key = "env:ANTHROPIC_API_KEY"
[providers.local] # any OpenAI-compatible endpoint
formats = ["openai-chat"]
base_url = "http://localhost:8000/v1"
[routes.smart] # clients ask for "model": "smart"
to = ["anthropic/claude-haiku-5-5", "openai/gpt-6-luna"]
hedge = "800ms" # race the second if the first is slow
[tools.search] # web search as MCP tools
vendor = "linkup"
key = "env:LINKUP_API_KEY"
[plugins.tool_loop] # every model can use them
servers = ["search"]
[plugins.respan] # trace every call in Respan
key = "env:RESPAN_API_KEY"
respan-gateway check validates it, and --watch or SIGHUP reloads it
without a restart. Without client keys, the gateway answers only on loopback
and refuses to start on a public address.
Reference: configuration ·
vendors · tool vendors ·
MCP and tools · gateway.example.toml
Supported API formats
Call the gateway in any format on the left, and it reaches every provider on the right, translating between them.
| Your code calls | It can reach | |
|---|---|---|
| Chat | OpenAI Chat Completions OpenAI Responses Anthropic Messages Gemini API | any chat model, whichever of the four formats it speaks |
| Realtime voice | OpenAI Realtime Gemini Live | OpenAI ⇄ Gemini voice; Mistral for transcription |
| Images | OpenAI Images Gemini Images | |
| Speech, transcription | OpenAI Speech OpenAI Transcriptions | |
| Embeddings | OpenAI Embeddings | |
| Video | OpenAI Videos Gemini Veo | |
| Decisions | Respan Decisions TypeSafe System One | |
| Tools | MCP | |
| Anything else | A vendor's own API | Relayed to that vendor untouched |
Each vendor's formats are in vendors, and the translation details in each format's README: chat, media, realtime and decisions.
Plugins
Everything the gateway does is a plugin on one public Rust API.
Models · 16 providers and any compatible endpoint, each reachable from any client format. All vendors →
Tools · any MCP server, plus built-in tools for search, browsing, code, documents and memory, usable from any model. All tool vendors →
Traffic control · named routes, fallback, retries, hedged requests, and the cheapest or fastest provider.
Observability · a live request log, the cost of every call, and traces in Respan.
Your framework · anything with a base URL. Guides for the OpenAI SDK, Anthropic SDK, Google GenAI, Vercel AI SDK, LangChain, Pydantic AI, Pi, OpenCode and more.
Your own plugin · start from the plugin guide or an example: guardrails, PII masking, billing, an LLM judge.
Built in: routing · tool-loop · mcp-router · pricing · respan · responses · credentials
Community
Contributions are welcome. CONTRIBUTING.md covers the architecture, building and tests, and a new vendor is usually one file. Start with a good first issue, ask in Discussions or Discord, and report security issues as SECURITY.md describes.
Roadmap: what we're building next is in issues. Missing a vendor, format or feature? Ask for it.
Want it managed? Respan runs the gateway for you, with dashboards, evals and span-02.
License
Dual-licensed under MIT or Apache-2.0, at your option.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- None found
- No native code found
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
An LLM gateway with a neutral core and compiled-in plugins. |
36 binary downloads per release | Not applicable | 630 | 0.3.0 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI Tools & Agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more. |
28,422 binary downloads per release | Not applicable | 10,556 | 0.30.0 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
Terminal UI to chat with large language models (LLM) using different model backends, and integrations with your favourite editors! |
5,642 binary downloads per release | Not applicable | 772 | 0.13.0 | GPU support unknown | No native code found | MIT |
|
edgequake-llm Listed
Multi-provider LLM abstraction library with caching, rate limiting, and cost tracking |
5,446 downloads over 30 days | 15 | 44 | 0.10.10 | GPU support unknown | No native code found | Apache-2.0 |
|
Plano is an AI-native proxy server and data plane for agentic apps. Smart LLM routing, observability, agent orchestration, and guardrails so you stay focused on your agents core logic. |
211 binary downloads per release | Not applicable | 7,111 | Not measured | Not measured | Apache-2.0 | |
|
A high-performance AI Gateway written in Rust, providing OpenAI-compatible APIs with intelligent routing, load balancing, and enterprise features |
34 binary downloads per release | Not applicable | 123 | 0.10.1 | GPU support unknown | No native code found | MIT |
|
An open protocol that gives AI agents a secure, sandboxed place to run code and use tools — with lean context usage. AXP works alongside MCP |
Not measured | Not applicable | 3 | Not measured | Not measured | Not measured | Apache-2.0 |
Why NewIts first release on 19 Oct 2026 is under 180 days old.
The check tests the Featured gates once the first release passes this age limit.
What else the check found
- The last activity is on 9 Nov 2026, 0 days ago. The rules expect an update within 365 days. Dormancy rule
Check notes
- the latest release was packaged from a dirty working tree
Exact rules: New. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: app: E = 365 daysdormancy: last activity 2026-11-09, 0 days ago, E = 365: activenew: new: first release 2026-10-19 is under 180 days old
Crates38 crates
- respan-gateway Primary
- respan-gateway-conversation
- respan-gateway-conversation-http
- respan-gateway-core
- respan-gateway-decision
- respan-gateway-decision-http
- respan-gateway-http
- respan-gateway-http-faults
- respan-gateway-http-transport
- respan-gateway-mcp
- respan-gateway-mcp-http
- respan-gateway-media
- respan-gateway-media-http
- respan-gateway-passthrough-http
- respan-gateway-plugin-credentials
- respan-gateway-plugin-fallback
- respan-gateway-plugin-mcp-aggregate
- respan-gateway-plugin-mcp-router
- respan-gateway-plugin-pricing
- respan-gateway-plugin-relay
- respan-gateway-plugin-respan
- respan-gateway-plugin-responses
- respan-gateway-plugin-routing
- respan-gateway-plugin-tool-loop
- respan-gateway-realtime
- respan-gateway-realtime-ws
- respan-gateway-sdk
- respan-gateway-serve
- respan-gateway-sse
- respan-gateway-tool-vendor-kit
- respan-gateway-tool-vendors
- respan-gateway-tool-vendors-green
- respan-gateway-tool-vendors-yellow
- respan-gateway-vendor-kit
- respan-gateway-vendors
- respan-gateway-vendors-green
- respan-gateway-vendors-yellow
- respan-gateway-ws
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- GitHub releases, fetched
- crates.io database dump, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption36 binary downloads per release4 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | Not measured | Yes | ||
| New dependents (365 days) | Not measured | Yes | ||
| Peak active dependents | Not measured | Yes | ||
| Active dependents as a share of the peak | Not measured | Yes | ||
| Binary downloads per release | 36 | GitHub releases | Yes |
MaintenanceLatest human commit: on the check date4 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-09 | GitHub repository | Yes | |
| Latest release | 2026-10-25 | GitHub releases | Yes | |
| First release | 2026-10-19 | GitHub releases | Yes | |
| Latest version | 0.3.0 | crates.io database dump | No | |
| Days the oldest outside issue waits for a reply | 20 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 5 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | No | |
| Published docs | Not measured | Yes | ||
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityNot measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | Not measured | Yes | ||
| RustSec unmaintained advisory | Not measured | Yes | ||
| Deprecation notice | Not measured | Yes | ||
| Deprecated requirement | Not measured | Yes |
Distribution3 releases, 40 downloads over 30 days6 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 3 | crates.io database dump | No | |
| Downloads over 30 days | 40 | crates.io database dump | No | |
| Binary downloads over the last 3 releases | 109 | GitHub releases | Yes | |
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | Not measured | Yes | ||
| Crate deleted from crates.io | Not measured | Yes |
Repository630 stars, 98 forks, 18 contributors, 476 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 630 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 98 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 18 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 476 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | Not measured | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.