mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 06:04:44 +00:00
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:
parent
d1e33599f6
commit
87ab5c5c3b
22 changed files with 262 additions and 1 deletions
|
|
@ -443,6 +443,21 @@ describe("Context overflow error handling", () => {
|
|||
}, 120000);
|
||||
});
|
||||
|
||||
// =============================================================================
|
||||
// Kimi For Coding
|
||||
// =============================================================================
|
||||
|
||||
describe.skipIf(!process.env.KIMI_API_KEY)("Kimi For Coding", () => {
|
||||
it("kimi-k2-thinking - should detect overflow via isContextOverflow", async () => {
|
||||
const model = getModel("kimi-coding", "kimi-k2-thinking");
|
||||
const result = await testContextOverflow(model, process.env.KIMI_API_KEY!);
|
||||
logResult(result);
|
||||
|
||||
expect(result.stopReason).toBe("error");
|
||||
expect(isContextOverflow(result.response, model.contextWindow)).toBe(true);
|
||||
}, 120000);
|
||||
});
|
||||
|
||||
// =============================================================================
|
||||
// Vercel AI Gateway - Unified API for multiple providers
|
||||
// =============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue