Description
Adds complete x.ai (Grok) provider support to Archestra platform.
Closes #1850
Implementation Details
- ✅ x.ai type definitions (OpenAI-compatible)
- ✅ Request/response/stream adapters
- ✅ Proxy routes with default agent and custom agent endpoints
- ✅ Configuration with environment variable support
- ✅ Dual LLM client for verification
- ✅ Chat integration with model fetching
- ✅ Frontend interaction handler
- ✅ Error handling (reuses OpenAI error mappers)
- ✅ Optimization rules support
- ✅ All TypeScript type checks pass
- ✅ Backend builds successfully
Testing
- Backend type-check: ✅ Passing
- Backend build: ✅ Successful
- Frontend type-check: ✅ Passing (x.ai-related)
API Key Setup
Set ARCHESTRA_CHAT_XAI_API_KEY environment variable with your x.ai API key from https://console.x.ai/
Models Supported
- grok-4
- grok-4-1-fast-reasoning
- grok-4-1-fast-non-reasoning
- grok-code-fast-1
Follows the same pattern as Cerebras provider (OpenAI-compatible API).
Algora Bounty
/claim #1850