fix: Update Kimi preset to coding endpoint

Kimi Code documents a separate Anthropic-compatible coding endpoint from the Moonshot open platform, so the built-in Kimi preset should point Claude-compatible traffic at the coding endpoint instead of the retired Moonshot anthropic path.

Constraint: Kimi Code Anthropic-compatible base URL is https://api.kimi.com/coding/ and this app appends /v1/messages at runtime.
Rejected: Use https://api.moonshot.cn/coding | official Kimi docs distinguish Kimi Code from the Moonshot open platform URLs.
Confidence: high
Scope-risk: narrow
Directive: Do not switch Kimi back to api.moonshot.cn/anthropic without rechecking current Kimi Code docs.
Tested: bun test src/server/__tests__/provider-presets.test.ts
Not-tested: Live Kimi API call with a real user key
This commit is contained in:
程序员阿江(Relakkes) 2026-04-28 14:34:03 +08:00
parent 3d3dfdad76
commit 736bce8ac1
2 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,7 @@ describe('provider presets API', () => {
expect(zhipu?.defaultModels.haiku).toBe('glm-4.5-air')
expect(zhipu?.defaultModels.sonnet).toBe('glm-5-turbo')
expect(zhipu?.defaultModels.opus).toBe('glm-5.1')
expect(kimi?.baseUrl).toBe('https://api.kimi.com/coding')
expect(kimi?.defaultModels.main).toBe('kimi-k2.6')
expect(minimax?.defaultModels.main).toBe('MiniMax-M2.7')
})

View File

@ -44,7 +44,7 @@
{
"id": "kimi",
"name": "Kimi",
"baseUrl": "https://api.moonshot.cn/anthropic",
"baseUrl": "https://api.kimi.com/coding",
"apiFormat": "anthropic",
"defaultModels": {
"main": "kimi-k2.6",