OpenCode Configuration
OpenCode is an open-source terminal AI coding tool, similar to an open-source alternative to Claude Code. By integrating with kineticRouter, you can use any model.
Configuration Steps
1. Install OpenCode
# macOS / Linux
curl -fsSL https://opencode.ai/install | bash
# Or install with Go
go install github.com/opencode-ai/opencode@latest2. Configure Environment Variables
OpenCode supports multiple Provider configurations. The OpenAI-compatible mode is recommended:
# OpenAI-compatible mode
export OPENAI_API_KEY=<your KINETICROUTER_API_KEY>
export OPENAI_BASE_URL=https://api.kineticrouter.com/v1If you primarily use Claude models, you can also configure Anthropic mode:
The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.
3. Configuration File
You can also configure via OpenCode’s configuration file:
The Anthropic-native route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.
4. Verify
opencode "Hello, how are you?"Recommended Models
For recommended models, see the Model Marketplace .
The specific configuration of OpenCode may change with version updates. Please refer to the OpenCode official documentation .