@henryhe1993

ZenMux

ZenMux LLM provider plugin for OpenClaw — OpenAI-compatible aggregator with 200+ models

当前版本
v0.1.3
code-plugin社区source-linked

openclaw-zenmux-provider

External OpenClaw plugin that adds the ZenMux LLM provider — an OpenAI-compatible aggregator that routes requests to 200+ models from OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot, and others through a single API key.

This is a standalone port of the in-tree provider proposed in openclaw/openclaw#43994, so it works on stock OpenClaw without waiting for that PR to merge.

Install

The standard ClawHub flow:

openclaw plugins install clawhub:openclaw-zenmux-provider
openclaw gateway restart

A bare npm-safe spec also works — OpenClaw tries ClawHub first, then npm:

openclaw plugins install openclaw-zenmux-provider

For local development:

openclaw plugins install -l /path/to/openclaw-zenmux   # symlink for fast iteration
# or
openclaw plugins install /path/to/openclaw-zenmux      # copy into managed install dir

Configure

Get an API key from the ZenMux console, then run:

openclaw onboard --zenmux-api-key $ZENMUX_API_KEY

Or set ZENMUX_API_KEY in your environment and OpenClaw will pick it up automatically. The default agent model is set to zenmux/openai/gpt-5.2; pick a different one with -m:

openclaw chat -m zenmux/anthropic/claude-sonnet-4.5 "hello"
openclaw chat -m zenmux/google/gemini-3.1-pro-preview "hello"

Available models are discovered dynamically from https://zenmux.ai/api/v1/models on each catalog refresh; if discovery is unreachable, a small static catalog is used as a fallback.

How it works

  • Transport: OpenAI-compatible (api: "openai-completions") against https://zenmux.ai/api/v1.
  • Model namespacing: every ZenMux model is referenced as zenmux/<provider>/<model-name> — the prefix routes the request through this plugin; the suffix is forwarded to ZenMux as the upstream model field.
  • Auth: single ZENMUX_API_KEY env var (or --zenmux-api-key flag during onboarding); the manifest declares this so OpenClaw can detect credentials before the plugin runtime loads.
  • Catalog discovery: uses fetchWithSsrFGuard from the plugin SDK so model discovery is gated by OpenClaw's standard SSRF policy.

Compatibility

  • Requires OpenClaw >= 2026.4.14. Older hosts will fail closed at install time per the manifest's compat.minGatewayVersion.

Note on running alongside the in-tree extension

If you are running a build of OpenClaw that ships the in-tree extensions/zenmux/ extension (PR #43994), you don't need this plugin — pick one or the other. Both register the provider id zenmux, so OpenClaw will report a duplicate-id error in openclaw plugins doctor if both are loaded.

Development

pnpm install
pnpm typecheck         # tsc --noEmit
pnpm test              # vitest unit tests
ZENMUX_API_KEY=zm-... OPENCLAW_LIVE_TEST=1 pnpm test:live

License

MIT — see LICENSE.

源码与版本

源码仓库

ZenMux/openclaw-zenmux-provider

打开仓库

源码提交

fa5847f9c397a51004552d80769509464b7e55a1

查看提交

安装命令

openclaw plugins install clawhub:openclaw-zenmux-provider

元数据

  • 包名: openclaw-zenmux-provider
  • 创建时间: 2026/05/06
  • 更新时间: 2026/05/06
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.4.14
  • 插件 API 范围: >=2026.4.14
  • 标签: latest
  • 文件数: 16