Kimi and Kimi CN join the provider catalog: OpenAI-compatible endpoints, verified live

- kimi -> https://api.moonshot.ai/v1 (platform.kimi.ai keys), kimi-cn -> https://api.moonshot.cn/v1 (platform.kimi.com keys)
- Adapters via openAiCompatibleAdapter; agent loop via makeChatCompletionsTurn; live model listing
- Curated fallback models per current docs: kimi-k2.7-code, kimi-k2.7-code-highspeed, kimi-k2.6
- Migration 056 seeds both providers (disabled) into existing organizations
- Both endpoints probed live: OpenAI-style 401 error envelope confirmed
This commit is contained in:
ZacharyZhang-NY committed 2026-07-10 17:12:16 -04:00
1 parent c30cbce459
commit 813276de71
9 files changed
+60 -2

No files matched your search

+18
View File
@@ -74,6 +74,24 @@ const RAW_CATALOG: Omit<ProviderCatalogEntry, "models" | "supportsLiveModels">[]
signInUrl: null,
credentialHelp: "Generate an API key at openrouter.ai → Keys.",
},
{
key: "kimi",
label: "Kimi",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "kimi-k2.7-code",
capabilityTags: ["chat", "coding"],
signInUrl: null,
credentialHelp: "Generate an API key at platform.kimi.ai → API keys.",
},
{
key: "kimi-cn",
label: "Kimi CN",
authType: PROVIDER_AUTH_TYPE.API_KEY,
defaultModel: "kimi-k2.7-code",
capabilityTags: ["chat", "coding"],
signInUrl: null,
credentialHelp: "Generate an API key at platform.kimi.com → API keys.",
},
{
key: "github-copilot",
label: "GitHub Copilot",
+10
View File
@@ -3,6 +3,14 @@ export interface ProviderModelEntry {
name: string;
}
// Shared by the international (api.moonshot.ai) and CN (api.moonshot.cn)
// platforms, which publish the same model line-up under different endpoints.
const KIMI_MODELS: ProviderModelEntry[] = [
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code" },
{ id: "kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code Highspeed" },
{ id: "kimi-k2.6", name: "Kimi K2.6" },
];
const ANTHROPIC_MODELS: ProviderModelEntry[] = [
{ id: "claude-opus-4-7", name: "Claude Opus 4.7" },
{ id: "claude-opus-4-6", name: "Claude Opus 4.6" },
@@ -216,6 +224,8 @@ export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
{ id: "zai-glm-4.7", name: "Z.AI GLM-4.7" },
{ id: "llama3.1-8b", name: "Llama 3.1 8B" },
],
kimi: KIMI_MODELS,
"kimi-cn": KIMI_MODELS,
openrouter: [
{ id: "anthropic/claude-sonnet-4.5", name: "Anthropic: Claude Sonnet 4.5" },
{ id: "anthropic/claude-opus-4.5", name: "Anthropic: Claude Opus 4.5" },