Multi-Channel Configuration Advanced
Configure multiple API channels for load balancing and failover.
Channel Concept
A channel represents an API endpoint configuration including URL, API key, and model settings.
Supported Channels
| Provider | Base URL | Models |
|---|---|---|
| OpenAI | https://api.openai.com/v1 | gpt-4o, gpt-4o-mini |
| Claude | https://api.anthropic.com | claude-3.5-sonnet |
| Gemini | https://generativelanguage.googleapis.com | gemini-pro |
| DeepSeek | https://api.deepseek.com | deepseek-chat |
Configuration Example
yaml
channels:
- name: openai-main
baseUrl: https://api.openai.com/v1
apiKey: ${OPENAI_API_KEY}
model: gpt-4o
priority: 1
- name: deepseek-backup
baseUrl: https://api.deepseek.com
apiKey: ${DEEPSEEK_API_KEY}
model: deepseek-chat
priority: 2Load Balancing
| Strategy | Description |
|---|---|
| Priority | Use by priority order |
| Round Robin | Rotate between channels |
| Random | Random selection |
Failover
Auto Failover
When a channel fails, automatically switches to next available channel.
yaml
channelStrategy:
failover: true
maxRetries: 3
retryDelay: 1000Web Panel
Manage channels visually in Web Admin Panel:
- Go to Channels tab
- Click Add Channel
- Fill in configuration
- Click Test Connection
- Save