feat(ai): add Kimi For Coding provider support

- Add kimi-coding provider using Anthropic Messages API
- API endpoint: https://api.kimi.com/coding/v1
- Environment variable: KIMI_API_KEY
- Models: kimi-k2-thinking (text), k2p5 (text + image)
- Add context overflow detection pattern for Kimi errors
- Add tests for all standard test suites
This commit is contained in:
Mario Zechner 2026-01-29 04:12:28 +01:00
parent d1e33599f6
commit 87ab5c5c3b
22 changed files with 262 additions and 1 deletions

View file

@ -3536,6 +3536,42 @@ export const MODELS = {
maxTokens: 128000,
} satisfies Model<"openai-completions">,
},
"kimi-coding": {
"k2p5": {
id: "k2p5",
name: "Kimi K2.5",
api: "anthropic-messages",
provider: "kimi-coding",
baseUrl: "https://api.kimi.com/coding",
reasoning: true,
input: ["text", "image"],
cost: {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 32768,
} satisfies Model<"anthropic-messages">,
"kimi-k2-thinking": {
id: "kimi-k2-thinking",
name: "Kimi K2 Thinking",
api: "anthropic-messages",
provider: "kimi-coding",
baseUrl: "https://api.kimi.com/coding",
reasoning: true,
input: ["text"],
cost: {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 262144,
maxTokens: 32768,
} satisfies Model<"anthropic-messages">,
},
"minimax": {
"MiniMax-M2": {
id: "MiniMax-M2",