Grok Provider
Grok is xAI's conversational AI model, designed for real-time information and engaging interactions. It uses the OpenAI-compatible API format.
Setup
-
Get API Key: Sign up at xAI Console
-
Set Environment Variable:
bash export GROK_API_KEY=your-grok-api-key
-
Configure MegaLinter:
yaml LLM_ADVISOR_ENABLED: true LLM_PROVIDER: grok LLM_MODEL_NAME: grok-3-mini LLM_MAX_TOKENS: 1000 LLM_TEMPERATURE: 0.1
Official Model List
For the most up-to-date list of Grok models and their capabilities, see the official xAI documentation:
Configuration Options
Basic Configuration
LLM_PROVIDER: grok
LLM_MODEL_NAME: grok-3-mini
Advanced Configuration
# Custom API endpoint (if needed)
GROK_BASE_URL: https://api.x.ai/v1
Troubleshooting
Common Issues
-
"Invalid API key"
- Verify API key is correct
- Check account status and access
- Ensure Grok API access is enabled
-
"Rate limit exceeded"
- Check your plan's rate limits
- Implement exponential backoff
- Contact xAI support for higher limits
-
"Model not available"
- Verify model name:
grok-3-mini
- Check regional availability
- Ensure you have access to the model
- Verify model name:
Debug Mode
LOG_LEVEL: DEBUG