Repository navigation
fix(grok): probe health with initialize and allow in-session model changes - #214
Conversation
…anges Grok health checks opened a full ACP session, so background probes could hang on authenticate or boot every configured MCP server. They also never reported login state, and the snapshot locked model changes to a new thread even though session/set_model already works. The check now runs grok --version, grok models, then a single ACP initialize and reads models from _meta.modelState. Failed initialize degrades to warning. grok-build is never sent as a model id. Adapted from pingdotgg#9154 and pingdotgg#8392. Made by Grok 4.6 High in Grok Build via Orca.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummarySummary
Confidence Score: 5/5Safe to merge; there are no blocking issues. There are no outstanding findings. Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
Keep the Grok probe PR current with main.
|
This is Leo's agent. Current GitHub state is CONFLICTING/DIRTY for 49d3f08. A read-only Preserve both sections. They describe different providers and are not alternatives. Re-run the focused provider/ACP tests and Greptile review/fix loop after updating the branch. Existing populated-provider/model-change integration verification remains required; resolving this documentation conflict alone is not independent acceptance. No branch or worktree files were modified. Orca delivery remains blocked by the missing selected executable, so this comment is a repair specification, not confirmed worker delivery or execution. |
# Conflicts: # docs/internals/providers.md
Problem
Grok health checks opened a full ACP session.
authenticatecan launch a browser login, andsession/newboots every configured MCP server, so background probes hung, timed out, and persistederrorover a working install. They also never reported auth state.The snapshot also advertised
requiresNewThreadForModelChange, so the server rejected in-session model changes even though Grok ACP already supportssession/set_model. Selecting the built-ingrok-buildslug sent that product name as a model id, which the real CLI rejects.Changes
checkGrokProviderStatusnow runsgrok --version, thengrok modelsfor login state and slugs, then a single ACPinitializeand reads models from_meta.modelState. Noauthenticate, nosession/new. A failed initialize degrades towarningwith the CLI model list instead oferror.XAI_API_KEYcounts as authenticated.AcpSessionRuntime.initialize()is additive. Cursor and OpenCode still usestart().applyGrokAcpModelSelectiontreatsgrok-buildas "keep the session's current model" and never sends it insession/set_model. Grok snapshots no longer setrequiresNewThreadForModelChange.Live UI is unchanged: BotRosterSidebar, BotThreadLanding, GroupThreadLanding, and BotPromptComposer still consume the provider snapshot. Settings Providers reads the same snapshot for status, auth, and models.
Upstream
Adapted from pingdotgg/t3code#9154 and pingdotgg/t3code#8392. Not a cherry-pick. Preserves Akeru naming, subscription auth, MCP headers, and the five-provider split. Codex/Kimi/OpenCode Go stay on Mastra.
Scope
This PR is Grok discovery/health probe and in-session model selection only.
Assigned Grok ports for this handoff:
Follow-up PRs will cover runtime cancel/steer and skills. Shared ACP notification encoding is not in this PR.
Verification
~/.grok/bin/grok): initialize advertised models without opening a session (220ms).checkGrokProviderStatusreportedready, authenticated, nogrok-buildslug, andrequiresNewThreadForModelChangeunset (575ms).XAI_API_KEYoverride.Limitations
session/cancelwithidandheaders. That is the next PR.Made by Grok 4.6 High in Grok Build via Orca.