As the title suggests.
{
"data": {
"directory": ".opencode"
},
"providers": {
"openai": {
"apiKey": "your-openai-api-key",
"disabled": false
},
"anthropic": {
"apiKey": "your-anthropic-api-key",
"disabled": false
},
"copilot": {
"disabled": false
},
"groq": {
"apiKey": "your-groq-api-key",
"disabled": false
},
"openrouter": {
"apiKey": "your-openrouter-api-key",
"disabled": false
},
"moonshot": {
"npm": "@ai-sdk/openai-compatible",
"name": "Kimi K2 (Moonshot)",
"options": {
"baseURL": "https://api.moonshot.ai/v1",
"apiKey": "sk-your-moonshot-api-key"
},
"models": {
"kimi-k2-0711-preview": {
"name": "kimi-k2"
}
}
}
},
"agents": {
"coder": {
"model": "moonshot/kimi-k2-0711-preview",
"maxTokens": 5000
},
"task": {
"model": "moonshot/kimi-k2-0711-preview",
"maxTokens": 5000
},
"title": {
"model": "moonshot/kimi-k2-0711-preview",
"maxTokens": 80
}
},
"shell": {
"path": "/bin/bash",
"args": ["-l"]
},
"lsp": {
"go": {
"disabled": false,
"command": "gopls"
}
},
"debug": false,
"debugLSP": false,
"autoCompact": true
}
There seems to be a bug - upon selecting 'Other' as a provider, the opencode initial config seems to be stuck in a loop, i.e. you cannot configure 'Other' providers.