AnonRouter Provider
Registers AnonRouter as an OpenAI-compatible chat and embedding provider with authenticated model discovery; requires a key with OpenAI-compatible access enabled.
README
AnonRouter Provider for Agent Zero
Registers AnonRouter as a chat and embedding model provider in Agent Zero, using
its OpenAI-compatible endpoint at https://api.anonrouter.ai/v1.
This is a configuration-only plugin. It ships a conf/model_providers.yaml that
merges over Agent Zero's built-in provider registry. There is no Python, no
dependency to install, no background process, and no lifecycle hook.
Requirements
- Agent Zero with plugin support and plugin-local model provider merging
(
helpers/providers.pymerging pluginconf/model_providers.yaml). - An AnonRouter API key with compatibility mode enabled — see below.
The key must allow plain bearer auth
AnonRouter's default integration path is a single-use ticket presented in an
x-anonrouter-ticket header. Agent Zero reaches models through LiteLLM's
OpenAI-compatible client, which can only send a static Authorization: Bearer
header. AnonRouter calls that compatibility mode, and its documentation
describes it as "intended for clients that can only send a static
Authorization: Bearer ... header, such as off-the-shelf OpenAI SDK
integrations."
Two consequences worth knowing before you install this:
- The key needs OpenAI-compatible access enabled. Compatibility mode is
enabled per key and is off by default. Select
OpenAI-compatible access when you create the key in the dashboard. A valid
key without this permission is rejected with
HTTP 403and thecompat_unavailableerror code. - Compatibility mode carries a privacy tradeoff that the ticket flow avoids. AnonRouter's own documentation states that under compatibility mode "the broker receives API-key identity and plaintext request content together in memory." If that tradeoff is unacceptable for your use, the ticket flow is not reachable through this plugin, because Agent Zero's model client cannot mint or attach per-request tickets.
Install
Place the repository contents at:
/a0/usr/plugins/anonrouter_provider/
The directory name must be anonrouter_provider, matching name in
plugin.yaml. Once this plugin is listed in the community Plugin Index, it can
also be installed from the Plugin Hub inside Agent Zero.
Then set the key in your Agent Zero .env:
ANONROUTER_API_KEY=<your key>
Agent Zero resolves the key by provider id, checking API_KEY_ANONROUTER first,
then ANONROUTER_API_KEY, then ANONROUTER_API_TOKEN. A comma-separated value
is rotated round-robin. You can equally paste the key into the provider's API key
field in Settings → Model Configuration instead of using .env.
Reload plugins or restart Agent Zero so the provider registry re-merges.
Use
Settings → Model Configuration, then select AnonRouter as the chat or embedding provider and type the model id into Model name.
Model discovery
The model search uses authenticated GET https://api.anonrouter.ai/v1/models.
The endpoint returned 217 model ids during the verification run on 2026-09-16.
The Model name field also accepts a model id that you type directly.
Nested creator/model ids are preserved
Ids of the form creator/model pass through unchanged. Agent Zero builds the
LiteLLM target as <litellm_provider>/<model>, which yields
openai/anthropic/claude-sonnet-4.5; LiteLLM's OpenAI-compatible provider strips
only the leading openai/ segment and forwards the rest verbatim. This is why
the plugin sets litellm_provider: openai instead of a dedicated LiteLLM
provider — a provider-specific route would consume the creator segment and send a
truncated id.
Embeddings
Select AnonRouter as the embedding provider and enter an embedding model id.
An authenticated request to POST /v1/embeddings returned a 1536-dimension
vector for openai/text-embedding-3-small during verification.
Costs
AnonRouter is a paid third-party service and bills for model usage under your own account. This plugin adds no charges of its own and makes no calls except the ones Agent Zero makes on your behalf when you select an AnonRouter model.
Verification status
Be aware of what was and was not tested, so you can judge the risk yourself.
Verified directly with a compatibility-enabled key against the live API on 2026-09-16. The key value was not printed or stored in this repository:
| Check | Result |
|---|---|
GET /v1/models |
200; 217 model ids returned |
POST /v1/chat/completions |
200 for meta-llama/llama-3.3-70b |
| Streaming Chat Completions | Five SSE events, a usage event, and [DONE] |
| Required tool call | 200; openai/gpt-4o-mini returned get_weather with finish_reason: tool_calls |
POST /v1/embeddings |
200; one 1536-dimension vector returned |
POST /v1/responses, without auth |
404 — not available, so this plugin pins Chat Completions |
The plugin configuration and Agent Zero provider merge are covered by offline tests. The plugin has not yet been installed in a running Agent Zero UI, so the remaining check is an end-to-end call from that runtime.
Uninstall
Remove the plugin through the Plugins UI, or delete
/a0/usr/plugins/anonrouter_provider/. The provider disappears from the
registry on the next reload. Nothing else is installed or registered, so there
is no other cleanup. Your ANONROUTER_API_KEY entry stays in .env until you
remove it, and any model preset still pointing at the anonrouter provider will
need to be repointed.
Tests
Offline structural checks, with no network and no credentials. They need only PyYAML, which the Agent Zero runtime already provides. Run from the repository root:
python tests/test_plugin_contract.py
They also run under pytest:
pytest tests/test_plugin_contract.py
Affiliation
This is a community plugin for Agent Zero. It is not affiliated with, sponsored by, or endorsed by Agent Zero or its maintainers.
License
MIT. See LICENSE.