List Models
Request
No parameters required. Include authentication header.Response Format
string
Always
listarray
Array of model objects
Response Example
Examples
Model Naming Convention
With Provider Prefix
Models with provider prefixes explicitly route to that provider:Without Provider Prefix
Models without prefixes allow auto-routing:Refresh Models
Request
string
Optional: Refresh only a specific provider (e.g.,
ollama, geminicli)Examples
Response
Gemini Native API
For Gemini-specific clients, use the native endpoint:supportedGenerationMethods:
Filter by Provider Type
Use the provider status endpoint to filter models:Model Capabilities
Different models support different features:
⚠️ = Model-dependent
Model Discovery
switchAILocal automatically discovers models from:- Configuration File: Models defined in
config.yaml - CLI Providers: Models detected from installed CLI tools
- Local Servers: Models from Ollama, LM Studio
- API Providers: Models from authenticated API providers
- Dynamic Registration: Models registered at runtime
Discovery Sources
- CLI Discovery
- Ollama Discovery
- API Discovery
- Manual Config
Troubleshooting
No Models Returned
Cause: No providers configured or authenticated Solution:- Verify provider setup: Check
config.yamlfor API keys - Test CLI tools: Run
gemini --version,claude --version - Check logs: Look for provider initialization errors
- Try refresh:
POST /v1/models/refresh
Missing Specific Model
Cause: Provider not authenticated or model not available Solution:- Verify provider access: Test CLI tool directly
- Check subscription: Ensure model is in your plan
- Refresh models: Force re-discovery
- Check spelling: Model IDs are case-sensitive
Stale Model List
Cause: Models cached from previous discovery Solution:Next Steps
Provider Prefixes
Learn model routing and provider selection
Chat Completions
Use models for chat completions
Auto-Routing
Let switchAILocal choose the best provider