refactor(registry): B2 migrate to LiteLLM-style schema — unified models[] with kind field
- 71 registry files: flat `media.*Config.models` → `models[]` with `kind` field - `media` wrapper removed → serviceKinds, *Config fields promoted top-level - `type` field renamed to `kind` (llm/image/tts/stt/embedding/embedding/video/music) - providers/index.js: PROVIDER_MEDIA now built from flat top-level media fields - shared/constants/providers.js: buildProviderEntry reads flat top-level media fields - route /v1/models: modelKind() uses kind||type; removed subConfig merge block - models/info route: removed sub-config fallback lookup (all models in PROVIDER_MODELS) - ttsProviders/index.js: synthesizeViaConfig reads tts models from PROVIDER_MODELS - test-models route, helpers.js, validate route: kind||type compat - Baselines: PROVIDERS 62/62 ✅, Alias 90/90 ✅ Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,31 +4,40 @@ export default {
|
||||
id: "kimi",
|
||||
alias: "kimi",
|
||||
display: {
|
||||
"name": "Kimi",
|
||||
"icon": "psychology",
|
||||
"color": "#1E3A8A",
|
||||
"textIcon": "KM",
|
||||
"website": "https://kimi.moonshot.cn",
|
||||
"notice": {
|
||||
"apiKeyUrl": "https://platform.moonshot.ai/console/api-keys"
|
||||
}
|
||||
name: "Kimi",
|
||||
icon: "psychology",
|
||||
color: "#1E3A8A",
|
||||
textIcon: "KM",
|
||||
website: "https://kimi.moonshot.cn",
|
||||
notice: {
|
||||
apiKeyUrl: "https://platform.moonshot.ai/console/api-keys",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
transport: {
|
||||
baseUrl: KIMI_CODING_BASE_URL,
|
||||
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
||||
format: "claude",
|
||||
urlSuffix: "?beta=true",
|
||||
headers: { ...CLAUDE_API_HEADERS },
|
||||
auth: {"combined":true,"header":"x-api-key","scheme":"raw"},
|
||||
},
|
||||
media: {
|
||||
serviceKinds: ["llm", "webSearch"],
|
||||
searchViaChat: { defaultModel: "kimi-k2.5", endpoint: "https://api.moonshot.cn/v1/chat/completions", pricingUrl: "https://platform.moonshot.ai/docs/pricing/chat" }
|
||||
headers: {
|
||||
"Anthropic-Version": "2023-06-01",
|
||||
"Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14",
|
||||
},
|
||||
auth: {
|
||||
combined: true,
|
||||
header: "x-api-key",
|
||||
scheme: "raw",
|
||||
},
|
||||
},
|
||||
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" },
|
||||
{ id: "kimi-latest", name: "Kimi Latest" }
|
||||
{ id: "kimi-latest", name: "Kimi Latest" },
|
||||
],
|
||||
serviceKinds: ["llm","webSearch"],
|
||||
searchViaChat: {
|
||||
defaultModel: "kimi-k2.5",
|
||||
endpoint: "https://api.moonshot.cn/v1/chat/completions",
|
||||
pricingUrl: "https://platform.moonshot.ai/docs/pricing/chat",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user