2026-06-13 21:08:37 +07:00
|
|
|
import { CLAUDE_API_HEADERS, KIMI_CODING_BASE_URL } from "../shared.js";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
id: "kimi",
|
2026-06-14 18:49:38 +07:00
|
|
|
priority: 170,
|
2026-06-13 21:08:37 +07:00
|
|
|
alias: "kimi",
|
2026-06-14 13:15:48 +07:00
|
|
|
display: {
|
2026-06-14 14:32:59 +07:00
|
|
|
name: "Kimi",
|
|
|
|
|
icon: "psychology",
|
|
|
|
|
color: "#1E3A8A",
|
|
|
|
|
textIcon: "KM",
|
|
|
|
|
website: "https://kimi.moonshot.cn",
|
|
|
|
|
notice: {
|
|
|
|
|
apiKeyUrl: "https://platform.moonshot.ai/console/api-keys",
|
|
|
|
|
},
|
2026-06-14 13:15:48 +07:00
|
|
|
},
|
|
|
|
|
category: "apikey",
|
2026-06-13 21:08:37 +07:00
|
|
|
transport: {
|
2026-06-14 14:32:59 +07:00
|
|
|
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
2026-06-13 21:08:37 +07:00
|
|
|
format: "claude",
|
2026-06-13 22:00:57 +07:00
|
|
|
urlSuffix: "?beta=true",
|
2026-06-20 10:09:50 +07:00
|
|
|
headers: { ...CLAUDE_API_HEADERS },
|
2026-06-14 14:32:59 +07:00
|
|
|
auth: {
|
|
|
|
|
combined: true,
|
|
|
|
|
header: "x-api-key",
|
|
|
|
|
scheme: "raw",
|
|
|
|
|
},
|
2026-06-13 21:08:37 +07:00
|
|
|
},
|
2026-06-20 10:09:50 +07:00
|
|
|
// Multi-endpoint: pick the transport matching client sourceFormat to skip translation.
|
|
|
|
|
transports: [
|
|
|
|
|
{
|
|
|
|
|
format: "openai",
|
|
|
|
|
baseUrl: "https://api.kimi.com/coding/v1/chat/completions",
|
|
|
|
|
auth: { combined: true, header: "Authorization", scheme: "bearer" },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
format: "claude",
|
|
|
|
|
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
|
|
|
|
urlSuffix: "?beta=true",
|
|
|
|
|
headers: { ...CLAUDE_API_HEADERS },
|
|
|
|
|
auth: { combined: true, header: "x-api-key", scheme: "raw" },
|
|
|
|
|
},
|
|
|
|
|
],
|
2026-06-13 21:08:37 +07:00
|
|
|
models: [
|
|
|
|
|
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
|
|
|
|
{ id: "kimi-k2.5", name: "Kimi K2.5" },
|
|
|
|
|
{ id: "kimi-k2.5-thinking", name: "Kimi K2.5 Thinking" },
|
2026-06-14 14:32:59 +07:00
|
|
|
{ id: "kimi-latest", name: "Kimi Latest" },
|
2026-06-14 13:15:48 +07:00
|
|
|
],
|
2026-06-14 14:32:59 +07:00
|
|
|
serviceKinds: ["llm","webSearch"],
|
|
|
|
|
searchViaChat: {
|
|
|
|
|
defaultModel: "kimi-k2.5",
|
|
|
|
|
endpoint: "https://api.moonshot.cn/v1/chat/completions",
|
|
|
|
|
pricingUrl: "https://platform.moonshot.ai/docs/pricing/chat",
|
|
|
|
|
},
|
2026-06-13 21:08:37 +07:00
|
|
|
};
|