AR
feat: Add x.ai (Grok) provider support
archestra-ai/archestra#1951

Summary

Adds x.ai (Grok) as a new LLM provider for Archestra.

Fixes #1850

/claim #1850

Changes

Backend

  • Config: Added llm.xai and chat.xai configuration entries with default base URL https://api.x.ai/v1
  • Types: Created types/llm-providers/xai/ with OpenAI-compatible type definitions (x.ai uses OpenAI-compatible API)
  • Adapter: Implemented xaiAdapterFactory wrapping OpenAI adapter with x.ai-specific configuration
  • Routes: Added V2 route handlers for x.ai chat completions (default and agent-specific)

Shared

  • Added xai to SupportedProvidersSchema
  • Added xai:chatCompletions to SupportedProvidersDiscriminatorSchema
  • Added RouteIds: XaiChatCompletionsWithDefaultAgent, XaiChatCompletionsWithAgent
  • Added display name: x.ai (Grok)

Frontend

  • Implemented XaiChatCompletionInteraction handler (mirrors OpenAI since x.ai is OpenAI-compatible)
  • Registered in interaction.utils.ts

API Key Instructions

  1. Create an account at x.ai Console
  2. Navigate to API Keys section
  3. Generate a new API key
  4. Set ARCHESTRA_CHAT_XAI_API_KEY environment variable

Supported Models

  • grok-4
  • grok-4-1-fast-reasoning
  • grok-4-1-fast-non-reasoning
  • grok-code-fast-1

Verification

  • Non-streaming responses work correctly
  • Streaming responses work correctly

Claim

Total prize pool $100
Total paid $0
Status Pending
Submitted January 09, 2026
Last updated January 09, 2026

Contributors

AS

Ashutosh Kumar Singh

@Ashutosh0x

100%

Sponsors

AS

Ashutosh Kumar Singh

@Ashutosh0x

$50
AR

Archestra

@archestra-ai

$50