Expand description
OpenCode Zen provider.
OpenCode Zen exposes an OpenAI-compatible chat-completions route. The
app-facing model id keeps the documented opencode/ prefix; requests use
the raw Zen model id.
Structs§
- Open
Code ZenClient - Concrete OpenCode Zen API client.
Enums§
- Endpoint
Family - Endpoint family selected by the OpenCode Zen model id.
Constants§
- API_
KEY_ ENV - Environment variable name for the OpenCode Zen API key.
- BASE_
URL - OpenCode Zen base URL.
- CHAT_
COMPLETIONS_ URL - OpenCode Zen chat-completions endpoint.
- DEFAULT_
RECOMMENDED_ MAX_ TOKENS - MODELS_
URL - OpenCode Zen model-discovery endpoint.
- MODEL_
PREFIX - User/config-facing model id prefix.
Functions§
- endpoint_
family - Select the documented OpenCode Zen endpoint for a raw model id.
- error_
message - Convert an OpenCode Zen error into a human-readable failure string.
- is_
model_ id - Whether
modelis an OpenCode Zen model id. - is_
retryable_ error - known_
models - Current OpenCode Zen models from public docs.
- model_
picker_ items - model_
status - probe_
api_ key - raw_
model_ id - Strip
opencode/from a model id. - reasoning_
options - Return the verified reasoning choices for one Zen model.
- validate_
api_ key - Try to validate an OpenCode Zen API key with a lightweight model-list request.
Type Aliases§
- Model
Info - Model metadata currently returned by OpenCode Zen.
- Models
Response - OpenAI-compatible model list response from
GET /models.