llm-zenmux
LLM plugin for ZenMux.ai — access every model available through ZenMux (OpenAI, Anthropic, Google, Moonshot, and more) from a single unified API key.
ZenMux exposes two API surfaces, both supported by this plugin:
- OpenAI Chat Completions (
zenmux/openai/…,zenmux/google/…,zenmux/moonshotai/…, …) - Anthropic Messages (
zenmux/anthropic/claude-…)
The plugin auto-discovers the live model list from https://zenmux.ai/api/v1/models (cached for one hour) and registers every model under the zenmux/ namespace.
Installation
pip install llm-zenmux
Or with uv:
uv pip install llm-zenmux
API key setup
llm keys set zenmux
Paste your ZenMux API key when prompted. The key is stored in llm's encrypted key store and sent as the Authorization: Bearer … header (OpenAI surface) or x-api-key header (Anthropic surface).
Usage
List available models:
llm zenmux models
Prompt any model — the -m flag takes the full zenmux/<provider>/<model> ID:
llm -m zenmux/openai/gpt-4o "What is ZenMux?"
llm -m zenmux/anthropic/claude-sonnet-4 "Explain prompt caching"
llm -m zenmux/google/gemini-2.5-flash "Summarize this file" -f README.md
Options
OpenAI Chat Completions models inherit llm's built-in OpenAI options (temperature, top_p, max_tokens, json_object, etc.) and add:
| Option | Description |
|---|---|
-o reasoning_effort none|minimal|low|medium|high|xhigh |
Constrain reasoning effort |
-o verbosity low|medium|high |
Control response verbosity |
-o logprobs true |
Return log probabilities |
-o top_logprobs N |
Top N tokens per position (0–20) |
-o stop '["END1","END2"]' |
Up to 4 stop sequences |
-o parallel_tool_calls true |
Enable parallel tool calls |
-o metadata '{"tenant":"acme"}' |
Business metadata (JSON object) |
-o web_search_options '{"search_context_size":"low"}' |
Web search tool config |
-o provider '{"routing":{"type":"priority"}}' |
ZenMux provider routing config |
-o model_routing_config '{"available_models":["openai/gpt-4o"]}' |
Model routing within a provider |
-o reasoning '{"enabled":true,"effort":"high"}' |
Fine-grained reasoning config |
-o json_object true |
JSON mode |
--schema '{"type":"object",...}' |
Structured output via JSON schema |
Anthropic Messages models support:
| Option | Description |
|---|---|
-o max_tokens 8192 |
Max output tokens (default 8192) |
-o temperature 0.0-1.0 |
Sampling temperature |
-o top_p 0.0-1.0 |
Nucleus sampling |
-o top_k 40 |
Top-K sampling |
-o stop_sequences '["END"]' |
Stop sequences |
-o thinking true -o thinking_budget 2000 |
Enable extended thinking |
-o thinking false |
Explicitly disable thinking |
Examples
JSON mode:
llm -m zenmux/openai/gpt-4o-mini -o json_object true "Return a JSON list of planets"
Structured output:
llm -m zenmux/openai/gpt-4o \
--schema '{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}}}' \
"Dr Who is 900 years old"
Extended thinking (Claude):
llm -m zenmux/anthropic/claude-sonnet-4 \
-o thinking true -o thinking_budget 4000 -o max_tokens 8000 \
"Prove there are infinitely many primes"
Reasoning effort (OpenAI o-series):
llm -m zenmux/openai/o3 -o reasoning_effort high "Design a B-tree index"
Streaming reasoning capture: When a model returns chain-of-thought, the plugin surfaces it as llm reasoning events — visible with llm -m zenmux/openai/o3 -t reasoning "…".
Image input:
llm -m zenmux/openai/gpt-4o -a photo.jpg "What's in this picture?"
Provider routing:
llm -m zenmux/openai/gpt-4o \
-o provider '{"routing":{"type":"priority","providers":["openai","azure"]},"fallback":true}' \
"Hello"
Features
- Unified access to all ZenMux-hosted models via OpenAI Chat Completions or Anthropic Messages APIs
- Automatic model discovery — live model list fetched and cached hourly; fallback list included if ZenMux is unreachable
- OpenAI surface extras:
reasoning_effort,verbosity,logprobs/top_logprobs,stop,parallel_tool_calls,metadata,web_search_options, ZenMuxproviderrouting,model_routing_config,reasoning - Anthropic surface extras: extended
thinkingwith configurablethinking_budget,top_k,stop_sequences, automatic prompt caching (5-minute ephemeralcache_controlon system prompt and last user message) - Extended thinking / chain-of-thought capture surfaced as
llmreasoning stream events and persisted toresponse.response_json - Attachment support derived from ZenMux
input_modalities— vision models get image types, file-capable models get PDF, audio models get wav/mpeg; unknown modalities (e.g. video) are ignored - Tool calling (function calling) support on both API surfaces
- Structured output — JSON mode and
--schema-based structured output - Async support — all model classes have
AsyncChat/AsyncKeyModelcounterparts llm zenmux modelsCLI command to list or refresh the cached model directory
License
Apache-2.0
Metadata
Release files for llm-zenmux 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_zenmux-0.1.1.tar.gz | 17.8 kB | Without provenance | Details for llm_zenmux-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_zenmux-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for llm_zenmux-0.1.1-py3-none-any.whl |
Total release size: 33.0 kB
Release files / llm_zenmux-0.1.1.tar.gz
| Download URL | llm_zenmux-0.1.1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c73e61a37916b61f4416b9657882aef78f54cc707b48982a2d5ffef661f60f0
|
|
BLAKE2b-256 checksum How to use checksums |
2d13d02d052aa0a914914f2d293a27a5168136acc9e5dea33ce609b5a014e2d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / llm_zenmux-0.1.1-py3-none-any.whl
| Download URL | llm_zenmux-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2029f8c7e3a4fbf5758e4ec117204d3d1ac32a4dce983a9fe092c889ee1b24de
|
|
BLAKE2b-256 checksum How to use checksums |
ab65f0b51544f4dd5aef6d9e48840a46891651258089c3d0e1d40e02bec4ce54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for llm-zenmux 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.