AI Model Configuration
Sidian supports multiple AI models and providers, allowing you to choose the best model for your specific needs. This guide covers how to configure, manage, and optimize AI models.
Available AI Models
Model Types
- Fast Models: Quick responses with lower accuracy
- Balanced Models: Good balance of speed and accuracy
- Advanced Models: Highest accuracy with longer processing time
- Specialized Models: Language or domain-specific models
- Local Models: Privacy-focused offline processing
Model Providers
- OpenAI: GPT-5, GPT-4.1, O3, O4-mini models
- Anthropic: Claude Opus 4.1, Claude Sonnet 4, Claude 3.5 models
- Google: Gemini models
- xAI: Grok-3, Grok-3-mini models
- DeepSeek: DeepSeek-V3 models
- Groq: High-speed inference models
- Mistral: Mistral AI models
- OpenRouter: Access to multiple model providers
- Microsoft Azure: Azure OpenAI Service
- Google Vertex AI: Cloud-based AI models
- Local Providers: Ollama, LM Studio, vLLM
- OpenAI-Compatible: Custom API endpoints
- LiteLLM: Multi-provider proxy
- Zhipu AI: GLM models
- Qwen: Alibaba Cloud models
- Kimi: Moonshot AI models
Model Configuration
Accessing Model Settings
- Settings Menu: Go to Settings → Providers/Local → select model from dropdown
- Status Bar: Click on AI model indicator in status bar
- Chat Interface: Click model selector in AI chat panel
Setting Up API Keys
Cloud Providers
To use cloud-based AI models, simply add your API key:
- OpenAI: Go to Settings → Providers → OpenAI → Enter your API key
- Anthropic: Go to Settings → Providers → Anthropic → Enter your API key
- Google: Go to Settings → Providers → Google → Enter your API key
- Other Providers: Follow the same pattern for any cloud provider
Local Models
For local models like Ollama or LM Studio:
- Ollama: Ensure Ollama is running at
http://127.0.0.1:11434
- LM Studio: Ensure LM Studio server is running at
http://localhost:1234
- Sidian will automatically detect and connect to local model servers
Model Selection Strategies
Task-Based Selection
- Code Completion: Fast models for real-time suggestions
- Code Explanation: Balanced models for detailed analysis
- Complex Refactoring: Advanced models for accuracy
- Documentation: Specialized models for technical writing
Performance Optimization
- Latency: Choose faster models for interactive features
- Accuracy: Use advanced models for critical tasks
- Cost: Balance performance with API costs
- Privacy: Use local models for sensitive code
Context Management
- Short Context: Use for quick completions and suggestions
- Medium Context: For function-level analysis
- Long Context: For file or project-level understanding
- Streaming: Enable for real-time response display
Model Switching
Dynamic Switching
- Per-Task: Different models for different AI features
- Per-Language: Language-specific model preferences
- Per-Project: Project-specific model configurations
- Per-User: Individual user preferences
Automatic Fallback
- Primary Failure: Automatically switch to backup model
- Rate Limiting: Use alternative model when rate limited
- Context Limit: Switch to model with larger context window
- Performance Issues: Fallback to faster model
Performance Monitoring
Model Metrics
- Response Time: Average time for model responses
- Success Rate: Percentage of successful requests
- Token Usage: Track token consumption and costs
- Error Rate: Monitor failed requests and errors
Usage Analytics
- Feature Usage: Which AI features are used most
- Model Preferences: Most popular models and settings
- Performance Trends: Response time and accuracy over time
- Cost Analysis: API usage and associated costs
Troubleshooting
Common Issues
Model not responding
- Check API key configuration
- Verify internet connection
- Check model availability status
- Try switching to different model
Slow responses
- Switch to faster model
- Reduce context window size
- Check network latency
- Monitor system resources
Poor quality responses
- Try advanced model
- Adjust temperature settings
- Provide more context
- Check prompt engineering
API errors
- Verify API key validity
- Check rate limits
- Monitor quota usage
- Review error messages
Best Practices
- Start Simple: Begin with default settings and adjust as needed
- Monitor Usage: Track performance and costs regularly
- Test Models: Compare different models for your use cases
- Optimize Context: Provide relevant context without overloading
- Stay Updated: Keep up with new models and improvements
Data Privacy
- Local Processing: Use local models for sensitive code
- Data Retention: Understand provider data retention policies
- Compliance: Ensure compliance with organizational policies
- Audit Logging: Monitor AI usage for security purposes
AI model configuration is crucial for getting the best performance from Sidian's AI features. Take time to experiment with different models and settings to find what works best for your development needs.