[FEATURE]:https://api.kimi.com/coding/ support
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
https://www.kimi.com/coding/docs/en/third-party-agents.html
This issue might be a duplicate of existing issues. Please check:
- #3178: Add n1n.ai API as a model provider (similar request for adding a new API provider)
- #2578: Feature Request: Add CometAPI Provider Support (similar API provider addition request)
- #2933: Add Nebius Ai Studio Models Support (similar provider support request)
- #3347: Add support for vultr as it has openai compatible api calls (closed, but was similar request that also mentioned Kimi support)
Feel free to ignore if none of these address your specific case.
@oldschoola Try use this for your opencode.json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"kimi": {
"npm": "@ai-sdk/openai-compatible",
"name": "Kimi",
"options": {
"baseURL": "https://api.kimi.com/coding/",
"apiKey": "<your-kimi-api-key>"
},
"models": {
"kimi-for-coding": {
"name": "Kimi for Coding",
"limit": {
"context": 262144,
"output": 32768
}
}
}
}
}
}
Thanks @OpeOginni for the config. I'm getting The requested resource was not found as response in the session. Any idea why?
No problem @JanOwiesniak . That issue could be cause of the name of the model you put, confirm that its correct, with the casing and hyphens kimi-for-coding
@oldschoola Try use this for your
opencode.json{ "$schema": "https://opencode.ai/config.json", "provider": { "kimi": { "npm": "@ai-sdk/openai-compatible", "name": "Kimi", "options": { "baseURL": "https://api.kimi.com/coding/", "apiKey": "
" }, "models": { "kimi-for-coding": { "name": "Kimi for Coding", "limit": { "context": 262144, "output": 32768 } } } } } }
Almost works for me. I think the base url needs to have v1 at the end ("baseURL": "https://api.kimi.com/coding/v1",).
However, am running into an annoying:
ERROR 2025-11-23T17:59:40 +1ms service=tui message=Access terminated statusCode=403 API error
This is working for me in opencode.
"provider": {
"kimi-for-coding": {
"npm": "@ai-sdk/anthropic",
"name": "Kimi For Coding",
"options": {
"baseURL": "https://api.kimi.com/coding/v1"
},
"models": {
"kimi-for-coding: {
"name": "Kimi For Coding",
"limit": {
"context": 262144,
"output": 32768
}
}
}
}
}
in auth.json
"kimi-for-coding": {
"type": "api",
"key": "sk-kimi-..."
}
https://www.kimi.com/coding/docs/en/third-party-agents.html
@briansunter working for me! I should've known to try use the anthropic sdk.
PR welcome if anyone wants to add it to models.dev
Just added it here @rekram1-node https://github.com/sst/models.dev/pull/459
merged!
it should deploy shortly and then everything should work as expected