fix(server): Grok status check uses grok models, not a full ACP session - #7747
fix(server): Grok status check uses grok models, not a full ACP session#7747troybrave wants to merge 1 commit into
Conversation
The Grok provider health check spawned grok agent stdio and session/new under a 15s deadline. That boots every workspace MCP server, so a healthy Grok install is marked error and cached even while chats work. Use grok models for model list and login state instead.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR fundamentally changes Grok provider status checks from ACP session-based to CLI-based discovery, and changes multiple error states to warnings. These runtime behavior changes and the new auth detection logic warrant human review. You can add or adjust custom eligibility rules. Learn more. |
Fixes #7746.
What changed
Grok provider health no longer starts
grok agent stdio+session/new.It now:
grok --version(unchanged).grok modelsto get available models and login state.Why
The old probe created a full ACP session under a 15s deadline.
session/newboots every configured MCP server for the workspace cwd. On a real workspace that misses 15s, T3 writesstatus: "error"to~/.t3/caches/grok.json, and the UI says Grok is broken even while Grok chats already work.grok modelslists models and login without starting MCP servers. Direct ACP handshake on this machine is ~2s; the timeout was the MCP-backed session, not a missing CLI.Tests
pnpm exec vp test run src/provider/Layers/GrokProvider.test.ts— 10/10 passed.Related
auth.statusfromgrok models(#7505).Note
Medium Risk
Changes Grok provider status, auth, and model discovery. A brittle CLI-output parser could mis-report login or models, but chats still work when listing fails.
Overview
Stops the Grok health probe from starting
grok agent stdio/session/new(which booted workspace MCP servers and often timed out aserror). Aftergrok --version, it now runsgrok modelsand parses login plus model ids.Installed + logged-in CLIs are ready. Missing login, or a failed/timed-out
grok models, is a warning with fallback models so chats are not treated as broken. Auth is set from that output (authenticated/unauthenticated/unknown).Reviewed by Cursor Bugbot for commit 60f089c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Replace ACP session with
grok modelsCLI for Grok provider status checkcheckGrokProviderStatusnow probes models and auth by runninggrok modelsinstead of starting a full ACP session, parsing the output via the newparseGrokModelsCliOutpututilitygrokAuthFromModelsClito map login state intoServerProviderAuth, anddisplayNameFromGrokModelSlugto derive human-friendly model names from slugsrunGrokCliCommandsupporting arbitrary subcommandsgrok modelsfailures and timeouts now return statuswarning(previouslyerror); when logged out, status iswarningwith guidance to rungrok login; empty model listings fall back to built-in models with statusreadyMacroscope summarized 60f089c.