mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
feat(kimi): merge OAuth into dual-auth provider, add K3/K2.7 models
Gộp kimi-coding vào kimi (oauth+apikey), parity CLIProxyAPI device flow/headers/refresh. Thêm K3 + K2.7 Code (+ Kimi Code ids), pricing/caps vision, cập nhật baseline. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"kr": "kiro",
|
||||
"cu": "cursor",
|
||||
"kc": "kilocode",
|
||||
"kmc": "kimi-coding",
|
||||
"kmc": "kimi",
|
||||
"cl": "cline",
|
||||
"oc": "opencode",
|
||||
"ocg": "opencode-go",
|
||||
@@ -117,6 +117,7 @@
|
||||
"cursor": "cu",
|
||||
"deepgram": "deepgram",
|
||||
"deepseek": "deepseek",
|
||||
"featherless": "featherless",
|
||||
"fireworks": "fireworks",
|
||||
"gemini": "gemini",
|
||||
"gemini-cli": "gc",
|
||||
@@ -132,7 +133,6 @@
|
||||
"kilocode": "kc",
|
||||
"kimchi": "kimchi",
|
||||
"kimi": "kimi",
|
||||
"kimi-coding": "kmc",
|
||||
"kiro": "kr",
|
||||
"mimo-free": "mmf",
|
||||
"minimax": "minimax",
|
||||
@@ -149,6 +149,7 @@
|
||||
"opencode-go": "opencode-go",
|
||||
"openrouter": "openrouter",
|
||||
"perplexity": "perplexity",
|
||||
"perplexity-agent": "perplexity-agent",
|
||||
"perplexity-web": "perplexity-web",
|
||||
"qoder": "qd",
|
||||
"qwen": "qw",
|
||||
@@ -188,6 +189,7 @@
|
||||
"edge-tts",
|
||||
"elevenlabs-tts-models",
|
||||
"fal-ai",
|
||||
"featherless",
|
||||
"fireworks",
|
||||
"gc",
|
||||
"gcli",
|
||||
@@ -206,7 +208,6 @@
|
||||
"kc",
|
||||
"kimchi",
|
||||
"kimi",
|
||||
"kmc",
|
||||
"kr",
|
||||
"local-device",
|
||||
"minimax",
|
||||
@@ -226,6 +227,7 @@
|
||||
"openrouter-tts-models",
|
||||
"openrouter-tts-voices",
|
||||
"perplexity",
|
||||
"perplexity-agent",
|
||||
"perplexity-web",
|
||||
"qd",
|
||||
"qw",
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
"xai": "https://auth.x.ai/oauth2/token",
|
||||
"grok-cli": "https://auth.x.ai/oauth2/token",
|
||||
"cline": "https://api.cline.bot/api/v1/auth/token",
|
||||
"kimi-coding": "https://auth.kimi.com/api/oauth/token"
|
||||
"kimi": "https://auth.kimi.com/api/oauth/token"
|
||||
},
|
||||
"authUrls": {
|
||||
"kiro": "https://prod.us-east-1.auth.desktop.kiro.dev"
|
||||
},
|
||||
"refreshUrls": {
|
||||
"cline": "https://api.cline.bot/api/v1/auth/refresh",
|
||||
"kimi-coding": "https://auth.kimi.com/api/oauth/token",
|
||||
"kimi": "https://auth.kimi.com/api/oauth/token",
|
||||
"xai": "https://auth.x.ai/oauth2/token",
|
||||
"grok-cli": "https://auth.x.ai/oauth2/token"
|
||||
},
|
||||
@@ -51,7 +51,7 @@
|
||||
"codex": "app_EMoamEEZ73f0CkXaXp7hrann",
|
||||
"qwen": "f0304373b74a44d2b584a3fb70ca9e56",
|
||||
"iflow": "10009311001",
|
||||
"kimi-coding": "17e5f671-d194-4dfb-9706-5516cb48c098",
|
||||
"kimi": "17e5f671-d194-4dfb-9706-5516cb48c098",
|
||||
"grok-cli": "b1a00492-073a-47ea-816f-4c329264a828"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"alicode-intl": {
|
||||
"baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions",
|
||||
"baseUrl": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions",
|
||||
"headers": {},
|
||||
"quirks": {
|
||||
"preserveCacheControl": true
|
||||
@@ -19,18 +19,17 @@
|
||||
"baseUrl": "https://api.anthropic.com/v1/messages",
|
||||
"format": "claude",
|
||||
"headers": {
|
||||
"Anthropic-Version": "2023-06-01",
|
||||
"anthropic-version": "2023-06-01",
|
||||
"Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14"
|
||||
}
|
||||
},
|
||||
"antigravity": {
|
||||
"baseUrls": [
|
||||
"https://daily-cloudcode-pa.googleapis.com",
|
||||
"https://daily-cloudcode-pa.sandbox.googleapis.com"
|
||||
"https://cloudcode-pa.googleapis.com"
|
||||
],
|
||||
"format": "antigravity",
|
||||
"headers": {
|
||||
"User-Agent": "antigravity/1.107.0 darwin/arm64"
|
||||
"User-Agent": "antigravity/ide/2.1.1 darwin/arm64"
|
||||
},
|
||||
"retry": {
|
||||
"429": {
|
||||
@@ -270,6 +269,11 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"featherless": {
|
||||
"baseUrl": "https://api.featherless.ai/v1/chat/completions",
|
||||
"validateUrl": "https://api.featherless.ai/v1/models",
|
||||
"format": "openai"
|
||||
},
|
||||
"fireworks": {
|
||||
"baseUrl": "https://api.fireworks.ai/inference/v1/chat/completions",
|
||||
"validateUrl": "https://api.fireworks.ai/inference/v1/models",
|
||||
@@ -307,6 +311,7 @@
|
||||
"github": {
|
||||
"baseUrl": "https://api.githubcopilot.com/chat/completions",
|
||||
"responsesUrl": "https://api.githubcopilot.com/responses",
|
||||
"messagesUrl": "https://api.githubcopilot.com/v1/messages",
|
||||
"headers": {
|
||||
"copilot-integration-id": "vscode-chat",
|
||||
"editor-version": "vscode/1.110.0",
|
||||
@@ -398,17 +403,18 @@
|
||||
"modelsUrl": "https://cli-chat-proxy.grok.com/v1/models",
|
||||
"userUrl": "https://cli-chat-proxy.grok.com/v1/user",
|
||||
"billingUrl": "https://cli-chat-proxy.grok.com/v1/billing",
|
||||
"clientVersion": "0.2.93",
|
||||
"clientIdentifier": "grok-pager",
|
||||
"clientVersion": "0.2.99",
|
||||
"clientIdentifier": "grok-shell",
|
||||
"tokenAuth": "xai-grok-cli",
|
||||
"headers": {
|
||||
"User-Agent": "grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)",
|
||||
"x-xai-token-auth": "xai-grok-cli",
|
||||
"x-grok-client-identifier": "grok-pager",
|
||||
"x-grok-client-version": "0.2.93",
|
||||
"x-authenticateresponse": "authenticate-response"
|
||||
"User-Agent": "grok-shell/0.2.99 (linux; x86_64)",
|
||||
"x-grok-client-identifier": "grok-shell",
|
||||
"x-grok-client-version": "0.2.99"
|
||||
},
|
||||
"usage": {
|
||||
"url": "https://cli-chat-proxy.grok.com/v1/billing?format=credits",
|
||||
"userUrl": "https://cli-chat-proxy.grok.com/v1/user?include=subscription"
|
||||
},
|
||||
"compactionAt": 400000,
|
||||
"retry": {
|
||||
"429": {
|
||||
"attempts": 2,
|
||||
@@ -477,7 +483,7 @@
|
||||
"scheme": "bearer"
|
||||
}
|
||||
},
|
||||
"kimi-coding": {
|
||||
"kimi": {
|
||||
"baseUrl": "https://api.kimi.com/coding/v1/messages",
|
||||
"format": "claude",
|
||||
"urlSuffix": "?beta=true",
|
||||
@@ -528,45 +534,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"kimi": {
|
||||
"baseUrl": "https://api.kimi.com/coding/v1/messages",
|
||||
"format": "claude",
|
||||
"urlSuffix": "?beta=true",
|
||||
"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"
|
||||
},
|
||||
"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": {
|
||||
"Anthropic-Version": "2023-06-01",
|
||||
"Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14"
|
||||
},
|
||||
"auth": {
|
||||
"combined": true,
|
||||
"header": "x-api-key",
|
||||
"scheme": "raw"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"kiro": {
|
||||
"baseUrl": "https://runtime.us-east-1.kiro.dev/generateAssistantResponse",
|
||||
"baseUrls": [
|
||||
@@ -774,6 +741,11 @@
|
||||
"validateUrl": "https://api.perplexity.ai/models",
|
||||
"format": "openai"
|
||||
},
|
||||
"perplexity-agent": {
|
||||
"baseUrl": "https://api.perplexity.ai/v1/responses",
|
||||
"validateUrl": "https://api.perplexity.ai/v1/models",
|
||||
"format": "openai-responses"
|
||||
},
|
||||
"qoder": {
|
||||
"baseUrl": "https://api3.qoder.sh/algo/api/v2/service/pro/sse/agent_chat_generation",
|
||||
"headers": {},
|
||||
|
||||
@@ -22,7 +22,7 @@ const resolved = {
|
||||
// Grok CLI injects oauth.tokenUrl onto PROVIDERS via OAUTH_INJECT_FIELDS
|
||||
"grok-cli": PROVIDERS["grok-cli"]?.tokenUrl,
|
||||
cline: PROVIDERS.cline?.tokenUrl,
|
||||
"kimi-coding": PROVIDERS["kimi-coding"]?.tokenUrl,
|
||||
kimi: PROVIDERS.kimi?.tokenUrl,
|
||||
},
|
||||
authUrls: {
|
||||
qwen: PROVIDERS.qwen?.authUrl,
|
||||
@@ -31,7 +31,7 @@ const resolved = {
|
||||
},
|
||||
refreshUrls: {
|
||||
cline: PROVIDERS.cline?.refreshUrl,
|
||||
"kimi-coding": PROVIDERS["kimi-coding"]?.refreshUrl,
|
||||
kimi: PROVIDERS.kimi?.refreshUrl,
|
||||
xai: PROVIDERS.xai?.refreshUrl,
|
||||
"grok-cli": PROVIDERS["grok-cli"]?.tokenUrl,
|
||||
},
|
||||
@@ -40,7 +40,7 @@ const resolved = {
|
||||
codex: PROVIDERS.codex?.clientId,
|
||||
qwen: PROVIDERS.qwen?.clientId,
|
||||
iflow: PROVIDERS.iflow?.clientId,
|
||||
"kimi-coding": PROVIDERS["kimi-coding"]?.clientId,
|
||||
kimi: PROVIDERS.kimi?.clientId,
|
||||
"grok-cli": PROVIDERS["grok-cli"]?.clientId,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user