@dorukardahan

ZeroAPI Router

ZeroAPI - transparent subscription-aware model and account routing for OpenClaw

当前版本
v3.9.1
code-plugin社区source-linked

ZeroAPI Router

ZeroAPI is an OpenClaw gateway plugin for transparent, subscription-aware model routing.

It reads your local OpenClaw model and auth-profile configuration, classifies each eligible turn with deterministic rules, and can return a per-turn model/provider override. There is no extra router LLM call in the hot path.

What It Does

  • Routes eligible OpenClaw turns across configured subscription providers.
  • Chooses models from the user's zeroapi-config.json policy.
  • Can select a matching auth profile when the configured account inventory includes one.
  • Preserves fixed-model specialist agents unless the policy explicitly opts them into routing.
  • Writes local routing and advisory state under the OpenClaw state directory.

What It Reads

  • ~/.openclaw/zeroapi-config.json
  • ~/.openclaw/openclaw.json
  • OpenClaw auth-profile inventory files
  • OpenClaw agent/workspace metadata needed to identify the current agent/session

ZeroAPI does not read provider dashboards, live remaining quota, billing counters, OAuth token values, or private API keys.

What It Writes

  • local routing logs
  • zeroapi-advisories.json when new supported providers/accounts are detected outside the current policy
  • bounded advisory delivery metadata so the same advisory is not repeated every reply
  • best-effort OpenClaw session auth-profile override state when a routed account has an auth profile

All writes are intended to stay inside the OpenClaw state directory.

Channel Advisories

When ZeroAPI detects a supported provider or account that is not yet in the policy, it can prepend one compact notice to the next outgoing reply in each conversation. This is explicit product behavior so the operator knows to rerun /zeroapi.

Disable channel notices with:

{
  "channel_advisories_enabled": false
}

or:

ZEROAPI_CHANNEL_ADVISORIES=false

The advisory file and logs can still be used for operators who do not want channel-visible notices.

Install Safely

Install only from the source-linked package:

openclaw plugins install clawhub:zeroapi@3.9.1

Verify the package source points to:

  • repo: dorukardahan/ZeroAPI
  • source path: plugin
  • source tag or commit matching the intended release

Configure

Run /zeroapi in an OpenClaw channel, or use the repo-local setup flow if you are operating from a shell. The generated policy should describe only the subscriptions and accounts you want ZeroAPI to use.

源码与版本

源码仓库

dorukardahan/ZeroAPI

打开仓库

源码提交

3876209f76cddeceb78c91042846ebcd1c57eea8

查看提交

安装命令

openclaw plugins install clawhub:zeroapi

元数据

  • 包名: zeroapi
  • 创建时间: 2026/04/22
  • 更新时间: 2026/07/11
  • 执行代码:
  • 源码标签: v3.9.1

兼容性

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