Skip to main content

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

Provider Validation

Airi includes built-in provider validation:

Best Practices

  1. API Key Security: Never hardcode API keys, use environment variables
  2. Rate Limiting: Implement retry logic with exponential backoff
  3. Error Handling: Handle network errors and API rate limits gracefully
  4. Streaming: Use streaming for better UX with long responses
  5. Model Selection: Choose appropriate model size for your use case
  6. Cost Optimization: Monitor token usage and cache when possible
  7. Local Fallback: Configure Ollama as fallback for privacy-sensitive scenarios

Troubleshooting

Connection Failed

Ollama Not Responding

Model Not Found

Rate Limit Errors