Skip to main content
OpenCode Zen exposes its “Go” subscription models behind an OpenAI-compatible API. GoModel ships a native opencode_go provider that defaults the base URL, so you only need an API key.

Configure

Or in config.yaml:
The default base URL is 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. /models and /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/completions or /v1/messages.
The set of /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.

Reasoning

Some OpenCode Zen models always think and reject requests that leave the reasoning parameter out:
GoModel therefore sends reasoning_effort: "low" on /chat/completions when a request carries no reasoning parameter at all. Models that ignore the parameter are unaffected. Raise the default per deployment:
Set it to none (or off) to inject nothing and forward requests untouched. Clients keep control when they ask for reasoning themselves: nothing is injected over an explicit reasoning.effort or a top-level reasoning_effort. GoModel’s recognized effort levels are mapped to their nearest equivalent in the low / high / max set OpenCode Zen accepts: Any other value (turbo, say) is forwarded unchanged for the upstream to judge. reasoning.effort is GoModel’s canonical field, so a request that sets both it and a top-level reasoning_effort is sent with the mapped reasoning.effort — the same precedence every other GoModel provider applies. Models routed to /messages use the Anthropic thinking dialect instead and are not affected by this mapping.

Not supported

  • Embeddings (returns invalid_request_error).
Last modified on August 29, 2026