---
title: OpenCode Zen
---

<!-- THIS FILE IS AUTO-GENERATED BY website/scripts/generate-model-docs.js. DO NOT EDIT MANUALLY. -->

# OpenCode Zen

Use `opencode/<model>` with VoltAgent's model router.

## Quick start

```ts
import { Agent } from "@voltagent/core";

const agent = new Agent({
  name: "opencode-agent",
  instructions: "You are a helpful assistant",
  model: "opencode/alpha-gd4",
});
```

## Environment variables

- `OPENCODE_API_KEY`

## Provider package

`@ai-sdk/openai-compatible`

This provider uses the OpenAI-compatible adapter.

## Default base URL

`https://opencode.ai/zen/v1`

You can override the base URL by setting `OPENCODE_BASE_URL`.

## Provider docs

- https://opencode.ai/docs/zen

## Models

<details>
  <summary>Show models (27)</summary>

- alpha-gd4
- alpha-glm-4.7
- big-pickle
- claude-3-5-haiku
- claude-haiku-4-5
- claude-opus-4-1
- claude-opus-4-5
- claude-sonnet-4
- claude-sonnet-4-5
- gemini-3-flash
- gemini-3-pro
- glm-4.6
- glm-4.7-free
- gpt-5
- gpt-5-codex
- gpt-5-nano
- gpt-5.1
- gpt-5.1-codex
- gpt-5.1-codex-max
- gpt-5.1-codex-mini
- gpt-5.2
- gpt-5.2-codex
- grok-code
- kimi-k2
- kimi-k2-thinking
- minimax-m2.1-free
- qwen3-coder

</details>
