feat: add xAI Grok provider - #109
Conversation
OpenAI-compatible client for https://api.x.ai/v1/chat/completions. Default model grok-4. Init --xai. Env SKILL_BENCH_XAI_API_KEY or XAI_API_KEY.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR adds xAI as a provider. It defines the Grok client, default model, API endpoint, environment mappings, request tests, and documentation updates. ChangesxAI provider integration
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Caller
participant Xai
participant xAI_API as xAI API
Caller->>Xai: submit chat messages and API key
Xai->>xAI_API: POST /v1/chat/completions
xAI_API-->>Xai: return completion content
Xai-->>Caller: return result
Merge Risk: ⚪ Minimal · up to The xAI provider configuration and documentation do not retain a supported actionable defect. The change is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 8 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. A rabbit found a Grok-shaped key, Comment |
Why
ROADMAP item 2. The surrounding skill ecosystem already runs on Grok; SkillBench had no xAI client.
What
Clients::Providers::Xai(OpenAI-compatible, same shape as Mistral/OpenRouter)https://api.x.ai, path/v1/chat/completions, default modelgrok-4skill-bench init --xaiSKILL_BENCH_XAI_API_KEY/XAI_API_KEY,SKILL_BENCH_XAI_MODEL/XAI_MODELDoes not add AWS Bedrock.
Proof
Summary by CodeRabbit
New Features
grok-4as the default model.XAI_API_KEYorSKILL_BENCH_XAI_API_KEY, plus model overrides.--xaiinitialization support.Documentation
Tests