opencode auth login
# Select "Kimi For Coding"
# Enter your API key (sk-kimi-...){
"provider": {
"kimi-for-coding": {
"name": "Kimi For Coding",
"npm": "@ai-sdk/anthropic",
"options": {
"baseURL": "https://api.kimi.com/coding/v1"
},
"models": {
"k2p5": {
"name": "Kimi K2.5",
"reasoning": true,
"attachment": false,
"limit": {
"context": 262144,
"output": 32768
},
"modalities": {
"input": ["text", "image", "video"],
"output": ["text"]
},
"options": {
"interleaved": {
"field": "reasoning_content"
}
}
}
}
}
}
}{
"model": "kimi-for-coding/k2p5"
}| Setting | Value |
|---|---|
| Provider ID | kimi-for-coding |
| Model ID | k2p5 |
| SDK | @ai-sdk/anthropic |
| Base URL | https://api.kimi.com/coding/v1 |
If you get error: thinking is enabled but reasoning_content is missing in assistant tool call message
The interleaved.field: "reasoning_content" option tells OpenCode how to handle the thinking/reasoning output.
If using @tarquinen/opencode-dcp, update to v1.2.8+ which has the fix for DeepSeek/Kimi models.
If using OCX (kdcokenny/ocx):
OCX stores configs in ~/.opencode/opencode.jsonc (NOT ~/.config/opencode/). Edit directly:
# Update DCP to latest
sed -i 's/@tarquinen\/opencode-dcp@[0-9.]*/@tarquinen\/opencode-dcp@latest/' ~/.opencode/opencode.jsonc
# Clear caches to force fresh resolution
rm -rf ~/.cache/opencode ~/.bun/install/cache
# Restart OpenCodeConfig file hierarchy (OCX):
| Location | Purpose |
|---|---|
~/.opencode/opencode.jsonc |
Active config (OCX local working dir) |
~/.config/opencode/profiles/default/opencode.jsonc |
Profile template |
~/.config/opencode/opencode.json |
Main config |
Get your API key at kimi.com/code
Thanks for this brother! Jazakallahu Khayran