Pure-Python Claude Code routing gateway
Project description
Emissary Router
Emissary Router is a local Claude Code gateway that routes each request to a supported model, keeps provider-specific caching intact, and records lightweight cost/cache telemetry.
Install
pip install emissary-router
With uv: uv pip install emissary-router. Before the package is published, install
from git: pip install "git+<repo-url>".
This installs the er command. If a global install is blocked (an
"externally-managed environment"), install inside a virtualenv — or use an isolated
installer like pipx install emissary-router.
Then set up config and API keys:
er init
er init creates ~/.emissary-router/config.json and prompts for your keys (it skips
any already in your environment), writing them to ~/.emissary-router/.env. Run it
again any time to change a key. You can also just export the keys instead:
export EMISSARY_ROUTER_API_KEY=...
export ANTHROPIC_API_KEY=...
export OPENROUTER_API_KEY=...
Then run Claude Code through the router:
er code -- [claude args]
er code starts the local gateway automatically if it is not already running. The
gateway keeps running after Claude Code exits; stop it with:
er stop
Installing from a clone instead? Run bash install.sh (editable install), then
er init.
Supported Models
Toggle models in ~/.emissary-router/config.json:
{
"models": {
"claude-sonnet-4.6": { "enabled": true, "provider": "anthropic" },
"claude-haiku-4.5": { "enabled": true, "provider": "anthropic" },
"gemini-3.1-flash-lite": { "enabled": true, "provider": "openrouter" }
},
"default": "claude-sonnet-4.6",
"confidence": 0.8
}
Built-in models:
claude-sonnet-4.6— Anthropic or OpenRouterclaude-haiku-4.5— Anthropic or OpenRoutergemini-3.1-flash-lite— OpenRouter
Set enabled: false to drop a model, and provider to choose how it's served.
Users cannot add arbitrary upstream models in V1; model id and pricing are owned by
the built-in catalog. See Configuration for details.
Docs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file emissary_router-0.0.1.tar.gz.
File metadata
- Download URL: emissary_router-0.0.1.tar.gz
- Upload date:
- Size: 41.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e44dcd20413058a571dadcc8c50c54eeaab3f33640f746df08c51d0f1f8222a0
|
|
| MD5 |
55cc28d0d0e79d82d0bd7876f26ea6a7
|
|
| BLAKE2b-256 |
25e2641a35ec35a0b852e5bc849d08b1d34608bca5f365f86d587231405b0703
|
Provenance
The following attestation bundles were made for emissary_router-0.0.1.tar.gz:
Publisher:
release.yml on Emissary-Tech/emissary-router
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emissary_router-0.0.1.tar.gz -
Subject digest:
e44dcd20413058a571dadcc8c50c54eeaab3f33640f746df08c51d0f1f8222a0 - Sigstore transparency entry: 1929968560
- Sigstore integration time:
-
Permalink:
Emissary-Tech/emissary-router@e99422cde46bd0698ac175d94f43121aedc251b6 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Emissary-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e99422cde46bd0698ac175d94f43121aedc251b6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file emissary_router-0.0.1-py3-none-any.whl.
File metadata
- Download URL: emissary_router-0.0.1-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
368b3ab6f9c5133c511ece67485e616ba38d95c936563c6c3effe7c8f35aa22c
|
|
| MD5 |
a66f6c578e678b73cebff51da612a167
|
|
| BLAKE2b-256 |
be3ab4ad78c84dea08e7fb3259056435228ba5b0f565f339ded035f7f1c1f3d0
|
Provenance
The following attestation bundles were made for emissary_router-0.0.1-py3-none-any.whl:
Publisher:
release.yml on Emissary-Tech/emissary-router
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emissary_router-0.0.1-py3-none-any.whl -
Subject digest:
368b3ab6f9c5133c511ece67485e616ba38d95c936563c6c3effe7c8f35aa22c - Sigstore transparency entry: 1929968685
- Sigstore integration time:
-
Permalink:
Emissary-Tech/emissary-router@e99422cde46bd0698ac175d94f43121aedc251b6 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Emissary-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e99422cde46bd0698ac175d94f43121aedc251b6 -
Trigger Event:
push
-
Statement type: