Skip to content

fix(server): Grok status check uses grok models, not a full ACP session - #7747

Open
troybrave wants to merge 1 commit into
pingdotgg:mainfrom
troybrave:fix/grok-provider-status-models-cli
Open

fix(server): Grok status check uses grok models, not a full ACP session#7747
troybrave wants to merge 1 commit into
pingdotgg:mainfrom
troybrave:fix/grok-provider-status-models-cli

Conversation

@troybrave

@troybrave troybrave commented Aug 21, 2026

Copy link
Copy Markdown

Fixes #7746.

What changed

Grok provider health no longer starts grok agent stdio + session/new.

It now:

  1. Runs grok --version (unchanged).
  2. Runs grok models to get available models and login state.
  3. Marks the provider ready when the CLI is installed and logged in.
  4. Marks warning (not error) if models listing fails/times out, or if Grok is installed but not logged in.

Why

The old probe created a full ACP session under a 15s deadline. session/new boots every configured MCP server for the workspace cwd. On a real workspace that misses 15s, T3 writes status: "error" to ~/.t3/caches/grok.json, and the UI says Grok is broken even while Grok chats already work.

grok models lists 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


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 as error). After grok --version, it now runs grok models and 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 models CLI for Grok provider status check

  • checkGrokProviderStatus now probes models and auth by running grok models instead of starting a full ACP session, parsing the output via the new parseGrokModelsCliOutput utility
  • Adds grokAuthFromModelsCli to map login state into ServerProviderAuth, and displayNameFromGrokModelSlug to derive human-friendly model names from slugs
  • Generalizes the version CLI runner into runGrokCliCommand supporting arbitrary subcommands
  • Behavioral Change: grok models failures and timeouts now return status warning (previously error); when logged out, status is warning with guidance to run grok login; empty model listings fall back to built-in models with status ready

Macroscope summarized 60f089c.

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.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d98ecc7b-f860-4eba-b73c-e68fd2ac4880

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 21, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grok provider health check times out because it starts a full ACP session (and every MCP server)

1 participant