Skip to content

Fix Grok MCP timeouts and ask compatibility - #3

Draft
RazonIn4K wants to merge 1 commit into
mainfrom
agent/fix-grok-mcp-timeouts-and-ask
Draft

Fix Grok MCP timeouts and ask compatibility#3
RazonIn4K wants to merge 1 commit into
mainfrom
agent/fix-grok-mcp-timeouts-and-ask

Conversation

@RazonIn4K

Copy link
Copy Markdown
Owner

What changed

  • enforce bounded per-attempt and end-to-end deadlines for chat, search, and search-enabled asks
  • disable search retries by default and return explicit degraded fallback results within the request budget
  • normalize reasoning_effort: "none" by omitting the unsupported xAI field
  • sanitize Axios errors and bearer credentials before logging
  • prefer local environment files before network-backed Doppler startup
  • expose runtime timeout/retry status through grok_health
  • document the timeout policy and add regression coverage

Why

The previous search path could wait through multiple 120-second attempts, causing MCP client timeouts. Separately, Grok 4.5 rejects the literal reasoning_effort value none, even though the MCP compatibility schema permits it.

Impact

Search and search-enabled asks now finish within a bounded server budget, provider failures are reported truthfully, startup is deterministic when local credentials exist, and grok_ask works for callers that select reasoning_effort: "none".

Validation

  • npm run build
  • npm test — 36 tests passed
  • sh -n start-grok-mcp.sh
  • forced provider timeout degraded safely in 37 ms
  • live stdio MCP grok_ask returned GROK_ASK_FIXED
  • restarted HTTP gateway grok_ask returned GROK_GATEWAY_FIXED

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant