chore(compliance): drop opencode zen free-pool from default config and docs

opencode.ai/zen is a free-quota pool for the official opencode app, keyed by
User-Agent fingerprint. Auto-provisioning it in the default config effectively
impersonated the official client to bypass FreeUsageLimitError — a ToS risk.
- default config (Go + GUI embed) now ships NO sources; users add their own
- README/README_EN: remove opencode adapter from built-in list and the zen
  free-pool paragraph
- adapter script and its unit tests stay (explicit opt-in only)
This commit is contained in:
JianFeeeee
2026-08-17 08:53:42 +08:00
parent f67831c3c2
commit d75d8411c0
4 changed files with 10 additions and 39 deletions

View File

@ -89,8 +89,7 @@ GOMODCACHE=... GOPROXY=off go build -tags luajit -o llmsproxy ./cmd/llmsproxy
> **配置不入库**:仓库不携带任何 config 文件(配置文件含密钥)。二进制首次运行时
> 会在 `-config` 指定的位置生成默认配置:随机 admin key打印在启动日志中
> 仅绑定 `127.0.0.1:8080`、内置一个免 key 的 opencode zen 源可直接对话
> 首次登录后请在 WebUI「密钥」页更换管理员密钥。
> 仅绑定 `127.0.0.1:8080`。首次登录后请在 WebUI「密钥」页更换管理员密钥
```bash
# 无 key -> 401
@ -281,19 +280,12 @@ return {
### 内置适配器
`openai` `deepseek` `anthropic` `gemini` `github` `groq` `mistral` `ollama` `kimicode`
`opencode`
`openai` `deepseek` `anthropic` `gemini` `github` `groq` `mistral` `ollama` `kimicode`
`anthropic`/`gemini`/`ollama` 适配器内置多模态转换(`image_url` → 各自上游格式);若
源启用 `disable_thinking``deepseek` 适配器会把 `extra_body.thinking.type` 置为
`disabled`
**opencode** 适配器面向 opencode.ai zen 免费池(`https://opencode.ai/zen/v1`
zen 按 User-Agent 指纹识别官方客户端并分流——非官方 UA 的请求curl、Go 默认 UA
会被丢进匿名池触发 `FreeUsageLimitError`。该适配器固定发送 opencode 客户端 UA
配合 `api_key: "public"`(官方无 key 客户端实际发送 `Bearer public`)即可走免费池,
零成本接入 `deepseek-v4-flash-free` 等免费模型。
**kimicode** 是展示 `build_headers` 的样例:云端校验调用方 app需要按
`meta.app_secret` 对时间戳+URL+请求体哈希做 HMAC 签名并附 `X-App-Sign` 等头。
配好 `sources[].meta.{app_id, app_secret, app_agent}` 即可。