Overview
switchAILocal supports multiple AI providers through three authentication methods. Choose the method that works best for your use case.Authentication Methods
Most users should start with CLI Wrappers (Option A) for the fastest setup with zero configuration.
Option A: CLI Wrappers (Recommended)
If you already havegemini, claude, codex, or vibe CLI tools installed and authenticated, switchAILocal uses them automatically.
Supported Providers
Available CLI providers:
| Provider | CLI Tool | Prefix | Example Model |
|---|---|---|---|
| Google Gemini | gemini | geminicli: | geminicli:gemini-2.5-pro |
| Anthropic Claude | claude | claudecli: | claudecli:claude-sonnet-4 |
| OpenAI Codex | codex | codex: | codex:gpt-4 |
| Mistral Vibe | vibe | vibe: | vibe:mistral-large |
| OpenCode | opencode | opencode: | opencode:build |
Option B: API Keys (Standard)
For cloud API providers, add API keys directly to yourconfig.yaml.
Option C: OAuth Login (Advanced)
For users who want switchAILocal to manage OAuth tokens directly without CLI tools.This method requires
GEMINI_CLIENT_ID and GEMINI_CLIENT_SECRET environment variables. Most users should use Option A or Option B instead.Local Model Providers
Ollama
Connect to locally running Ollama models.LM Studio
Connect to LM Studio for local model hosting.config.yaml
OpenCode
Integrate with OpenCode for specialized development tasks.config.yaml
OpenAI-Compatible Providers
Connect any OpenAI-compatible API endpoint.config.yaml
Load Balancing
Configure multiple credentials per provider for automatic load balancing.config.yaml
Routing Strategies
Routing Strategies
- round-robin: Distributes requests evenly across all credentials
- fill-first: Uses the first credential until quota is exhausted, then moves to the next
Model Aliasing
Create friendly aliases for frequently used models.config.yaml
Verification
List all available models to verify provider setup:Next Steps
Docker Deployment
Deploy switchAILocal with Docker for production use
Management Dashboard
Use the web UI to configure providers visually