Overview
Airi integrates with numerous LLM providers through the@xsai package ecosystem, offering a unified interface for text generation, chat completions, embeddings, and more. The system supports both cloud-based and local model providers.
Supported Providers
Airi supports 20+ LLM providers out of the box:Major Cloud Providers
- OpenAI - GPT-4, GPT-4 Turbo, GPT-3.5
- Anthropic - Claude Sonnet, Claude Opus, Claude Haiku
- Google - Gemini Pro, Gemini Ultra
- Groq - Fast inference for open models
- DeepSeek - Chinese LLM provider
- Mistral AI - Mistral Large, Mistral Medium
Aggregator Services
- OpenRouter - Access to 100+ models
- Together AI - Open model hosting
- Fireworks AI - Fast inference platform
- Novita AI - Multi-model platform
Specialized Providers
- Perplexity AI - Search-augmented models
- Cerebras - Ultra-fast inference
- Moonshot AI - Long-context models
- Minimax - Multimodal AI
- xAI - Grok models
Chinese Providers
- Aliyun (302.ai) - Alibaba Cloud models
- Moonshot AI - Kimi models
- ModelScope - Alibaba model hub
Local/Self-Hosted
- Ollama - Run models locally
- OpenAI-Compatible - Any OpenAI API-compatible server
Provider Configuration
OpenAI
Anthropic (Claude)
Google Gemini
Ollama (Local Models)
OpenAI-Compatible Servers
Using Providers in Airi
Provider Store
Model Management
Chat Integration
Provider Features
Text Generation
Streaming
Embeddings
Function Calling / Tools
Local Model Setup
Installing Ollama
Running Models
Recommended Models
Provider Validation
Airi includes built-in provider validation:Best Practices
- API Key Security: Never hardcode API keys, use environment variables
- Rate Limiting: Implement retry logic with exponential backoff
- Error Handling: Handle network errors and API rate limits gracefully
- Streaming: Use streaming for better UX with long responses
- Model Selection: Choose appropriate model size for your use case
- Cost Optimization: Monitor token usage and cache when possible
- Local Fallback: Configure Ollama as fallback for privacy-sensitive scenarios
