opencode_go
provider that defaults the base URL, so you only need an API key.
Configure
config.yaml:
https://opencode.ai/zen/go/v1. Authentication uses
Authorization: Bearer <api_key> with the key generated in the OpenCode Zen
console.
Models
GET /v1/models proxies OpenCode Zen’s model list, exposing IDs such as
glm-5.1, kimi-k2.7-code, deepseek-v4-pro, and mimo-v2.5-pro. Restrict the
advertised set with a configured list when you only want a subset:
Endpoints
OpenCode Zen serves most models on OpenAI-style/chat/completions (Bearer
auth) and a few models only on the Anthropic-native /messages endpoint
(x-api-key auth). GoModel routes per model:
- OpenAI-style models (GLM, Kimi, DeepSeek, MiMo, MiniMax, most Qwen) go to
/chat/completions./modelsand/v1/responses(translated to chat completions) use the same path. - Anthropic-only models are translated to the Anthropic Messages dialect and
sent to
/messages, mirroring how GoModel already serves native Anthropic. Both paths normalize to the same OpenAI-compatible response, so clients see one consistent surface regardless of which model they pick — whether they call/v1/chat/completionsor/v1/messages.
/messages-only models is currently maintained manually (default:
qwen3.7-max) because OpenCode Zen does not yet expose per-model endpoint
metadata. Override it when needed:
This manual split is temporary and will be replaced by metadata-driven routing
once the upstream model list distinguishes endpoints.
Not supported
- Embeddings (returns
invalid_request_error).