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:
Fadjrir Herlambang
2026-07-10 11:47:08 +07:00
committed by decolua
parent c73c419d09
commit a11937cdd6
28 changed files with 2695 additions and 376 deletions
+12
View File
@@ -66,6 +66,10 @@
"vertex-partner": "vertex-partner",
"gw": "grok-web",
"grok-web": "grok-web",
"gcli": "grok-cli",
"gb": "grok-cli",
"grok-build": "grok-cli",
"grok-cli": "grok-cli",
"pw": "perplexity-web",
"perplexity-web": "perplexity-web",
"mimo": "xiaomi-mimo",
@@ -104,6 +108,7 @@
"chutes": "chutes",
"claude": "cc",
"cline": "cl",
"clinepass": "clinepass",
"cloudflare-ai": "cloudflare-ai",
"codebuddy-cn": "cbcn",
"codex": "cx",
@@ -119,11 +124,13 @@
"gitlab": "gitlab",
"glm": "glm",
"glm-cn": "glm-cn",
"grok-cli": "gcli",
"grok-web": "grok-web",
"groq": "groq",
"hyperbolic": "hyperbolic",
"iflow": "if",
"kilocode": "kc",
"kimchi": "kimchi",
"kimi": "kimi",
"kimi-coding": "kmc",
"kiro": "kr",
@@ -147,6 +154,7 @@
"qwen": "qw",
"siliconflow": "siliconflow",
"together": "together",
"venice": "venice",
"vercel-ai-gateway": "vercel-ai-gateway",
"vertex": "vertex",
"vertex-partner": "vertex-partner",
@@ -168,6 +176,7 @@
"cc",
"cerebras",
"cl",
"clinepass",
"cloudflare-ai",
"cohere",
"comfyui",
@@ -181,6 +190,7 @@
"fal-ai",
"fireworks",
"gc",
"gcli",
"gemini",
"gemini-tts-models",
"gemini-tts-voices",
@@ -194,6 +204,7 @@
"hyperbolic",
"if",
"kc",
"kimchi",
"kimi",
"kmc",
"kr",
@@ -224,6 +235,7 @@
"siliconflow",
"stability-ai",
"together",
"venice",
"vertex",
"vertex-partner",
"volcengine-ark",