f8ec10ec6be8c6b92df8ae190d2ef5ed65f732ed
# Add xAI (Grok) Provider Support ## Overview This PR adds support for xAI's Grok models as an AI provider, focusing on coding-optimized models. ## Changes Made ### Provider Configuration (`language_model_helpers.ts`) - Added xAI to `MODEL_OPTIONS` with 3 coding-focused models: - `grok-code-fast-1`: Fast, economical coding model (256k context) - `grok-4`: Most capable flagship model (256k context) - `grok-3`: Powerful coding model (131k context) <img width="805" height="592" alt="image" src="https://github.com/user-attachments/assets/a99b9495-e90e-40f3-a772-be9807b24501" /> <img width="805" height="653" alt="image" src="https://github.com/user-attachments/assets/aad7b333-ee74-457a-b5b7-5d20bd54d7e0" /> ## Dependencies - Requires `@ai-sdk/xai` package (already imported) - Uses existing provider pattern and infrastructure ## Why xAI for Coding? xAI's Grok models have shown impressive results in coding benchmarks: - Trained on high-quality programming datasets reflecting real-world tasks - Excels at agentic coding workflows with fast reasoning capabilities - Strong performance across multiple programming languages (TypeScript, Python, Java, Rust, C++, Go) - Achieved 70.8% on SWE-Bench-Verified using internal evaluation - Optimized for rapid iteration in development environments <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds xAI (Grok) as a provider so users can pick Grok coding models in the app. Integrates provider config, client wiring, and schema updates. - **New Features** - Added xAI provider with env var mapping (XAI_API_KEY) and provider metadata. - Exposed models: grok-code-fast-1 (256k), grok-4 (256k), grok-3 (131k). - Hooked up get_model_client to use @ai-sdk/xai (createXai). - Included "xai" in validation schemas and model options. - **Migration** - Set XAI_API_KEY to enable xAI. <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Will Chen <willchen90@gmail.com>
Dyad
Dyad is a local, open-source AI app builder. It's fast, private, and fully under your control — like Lovable, v0, or Bolt, but running right on your machine.
More info at: http://dyad.sh/
🚀 Features
- ⚡️ Local: Fast, private and no lock-in.
- 🛠 Bring your own keys: Use your own AI API keys — no vendor lock-in.
- 🖥️ Cross-platform: Easy to run on Mac or Windows.
📦 Download
No sign-up required. Just download and go.
👉 Download for your platform
🤝 Community
Join our growing community of AI app builders on Reddit: r/dyadbuilders - share your projects and get help from the community!
🛠️ Contributing
Dyad is open-source (Apache 2.0 licensed).
If you're interested in contributing to dyad, please read our contributing doc.
Description
Languages
TypeScript
97.4%
JavaScript
1.6%
CSS
0.6%
Shell
0.2%