mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
feat(grok-cli): add Grok CLI / Grok Build provider with OAuth device-code flow (#2502)
New OAuth provider routing through cli-chat-proxy.grok.com (OpenAI Responses
API), distinct from xai (api.x.ai) and grok-web (cookie SSO):
- Registry + GrokCliExecutor: Chat Completions -> Responses transform, CLI
fingerprint headers, virtual effort models grok-4.5-{low,medium,high}
- OAuth device-code flow (auth.x.ai) with no-PKCE, shared xAI token refresh
- store=false multi-turn continuity via reasoning encrypted_content
- Quota tracker: on-demand window + prepaid balance on dashboard
- Connection test: 402 spending-limit = soft success (auth OK, out of credits)
- Alias/oauth/provider baselines + unit tests
This commit is contained in:
committed by
decolua
parent
c73c419d09
commit
a11937cdd6
@@ -13,8 +13,8 @@
|
||||
"auth": "https://api.anthropic.com/v1/oauth/authorize"
|
||||
},
|
||||
"qwen": {
|
||||
"token": "https://qwen.ai/api/v1/oauth2/token",
|
||||
"auth": "https://qwen.ai/api/v1/oauth2/device/code"
|
||||
"token": "https://chat.qwen.ai/api/v1/oauth2/token",
|
||||
"auth": "https://chat.qwen.ai/api/v1/oauth2/device/code"
|
||||
},
|
||||
"iflow": {
|
||||
"token": "https://iflow.cn/oauth/token",
|
||||
@@ -33,24 +33,25 @@
|
||||
"iflow": "https://iflow.cn/oauth/token",
|
||||
"kiro": "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",
|
||||
"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"
|
||||
},
|
||||
"authUrls": {
|
||||
"qwen": "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
||||
"iflow": "https://iflow.cn/oauth",
|
||||
"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",
|
||||
"xai": "https://auth.x.ai/oauth2/token"
|
||||
"xai": "https://auth.x.ai/oauth2/token",
|
||||
"grok-cli": "https://auth.x.ai/oauth2/token"
|
||||
},
|
||||
"clientIds": {
|
||||
"claude": "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
|
||||
"codex": "app_EMoamEEZ73f0CkXaXp7hrann",
|
||||
"qwen": "f0304373b74a44d2b584a3fb70ca9e56",
|
||||
"iflow": "10009311001",
|
||||
"kimi-coding": "17e5f671-d194-4dfb-9706-5516cb48c098"
|
||||
"kimi-coding": "17e5f671-d194-4dfb-9706-5516cb48c098",
|
||||
"grok-cli": "b1a00492-073a-47ea-816f-4c329264a828"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user