Skip to Content
AI AgentsOpenCode

OpenCode

A terminal agent configured per project by a checked-in file. It reaches Devotel AI through the OpenAI-compatible provider, so the whole configuration is one JSON block.

Install

curl -fsSL https://opencode.ai/install | bash

The installer puts the binary in ~/.opencode/bin. Make sure that directory is on your PATH:

export PATH=$HOME/.opencode/bin:$PATH

Persist it in ~/.zshrc or ~/.bashrc.

Configure the provider

Create opencode.json in your project folder:

{ "$schema": "https://opencode.ai/config.json", "provider": { "devotel": { "npm": "@ai-sdk/openai-compatible", "name": "Devotel AI", "options": { "baseURL": "https://api.devotel.com/v1", "apiKey": "{env:DEVOTEL_API_KEY}" }, "models": { "kimi-k3": { "name": "Kimi K3" } } } } }

The {env:DEVOTEL_API_KEY} placeholder means the file holds no secret and can be committed.

Export your key

export DEVOTEL_API_KEY=dvt-YOUR_KEY

Start it and select the model

opencode

Press /models, then choose Devotel AI → Kimi K3.

Selecting the model is per project, and OpenCode remembers it. If a session ever answers suspiciously fast or in a different voice, press /models and check which provider is selected.

Using it

Describe what you want; OpenCode plans, then asks you to approve each tool call — file writes, shell commands, searches — before it runs. The conversation is stored per project, so you can leave and come back to the same thread.

Because it re-sends the accumulated context each step, a long session’s requests get progressively larger. That is normal for agents and is the main driver of token spend; see how agents use the API.

Troubleshooting

SymptomCause and fix
opencode: command not found~/.opencode/bin is not on PATH
Devotel AI missing from /modelsopencode.json is not in the folder you started from, or has a typo
401DEVOTEL_API_KEY unset in the shell that launched opencode
404 / model_not_foundThe model key must be exactly kimi-k3