Supported Providers
Claude
Anthropic Claude
- Models: Claude 3.5 Sonnet, Claude 4.0
- Native vision and PDF support
- Extended thinking mode
- Tool calling support
Google Gemini
Google AI
- Models: Gemini 2.0, Gemini 1.5 Pro/Flash
- Native vision support
- Fast response times
- Free tier available
OpenRouter
OpenRouter
- Access to 100+ models
- Kimi k2.5 with reasoning
- Trinity models
- Pay-per-token pricing
Ollama
Local Ollama
- Run models locally
- No API key required
- Privacy-focused
- Works offline
OpenAI
OpenAI GPT
- GPT-4, GPT-4 Turbo
- Vision and tool support
- Production-grade reliability
Groq
Groq
- Ultra-fast inference
- Llama 3, Mixtral models
- Tool calling support
Provider Configuration
Setting Up API Keys
You can configure provider API keys in two ways:- Settings UI
- Environment Variables
Desktop App:
- Open Settings (gear icon or
Cmd/Ctrl+,) - Go to Keys tab
- Enter your API key for each provider
- Click Save
- Anthropic API Key (Claude)
- Google AI API Key (Gemini)
- OpenRouter API Key
- OpenAI API Key
- Groq API Key
Ollama doesn’t require an API key - it connects to
localhost:11434 by default.Choosing Your Default Provider
Select Default Provider
Choose from the dropdown:
- Claude (recommended for best results)
- Google (fast and free)
- OpenRouter (most model choices)
- Ollama (local and private)
Provider Fallback Chain
Asta uses a fixed fallback order inspired by OpenClaw:How Fallback Works
Provider Runtime State (backend/app/provider_flow.py):
- Manual Disable: You can disable providers in Settings
- Auto-Disable: Asta automatically disables providers on:
- Authentication failures (invalid API key)
- Billing failures (quota exceeded, payment required)
- Rate limit errors (temporarily)
- Re-enable: Auto-disabled providers can be re-enabled in Settings once the issue is resolved
backend/app/providers/fallback.py):
Provider Selection Logic
Provider Selection Logic
For a provider to be used:
- Must have valid API key (except Ollama)
- Must be enabled (not manually disabled)
- Must not be auto-disabled
- Must not be excluded from current request
Provider-Specific Features
Claude (Anthropic)
Claude
File: When to use:
backend/app/providers/claude.pyUnique Features:- Extended thinking mode with
<thinking>blocks - Native PDF document reading (full-fidelity)
- Supports reasoning effort levels
- Best for complex reasoning tasks
- Complex multi-step reasoning
- Document analysis (PDFs)
- Creative writing
- Code generation with detailed explanations
Google Gemini
Google Gemini
File: When to use:
backend/app/providers/google.pyUnique Features:- Free tier with generous limits
- Fast response times
- Native vision support
- Tool calling support
- Everyday chat interactions
- Quick questions and answers
- When you need fast responses
- Image analysis
OpenRouter
OpenRouter
File: Reasoning Support:
OpenRouter injects
backend/app/providers/openrouter.pyUnique Features:- Access to 100+ models from different providers
- Kimi k2.5 with native reasoning (
moonshotai/kimi-k2.5) - Trinity models with reasoning support
- Vision preprocessor fallback for non-vision models
- Reasoning effort and streaming
<think>...</think> tags around reasoning content, which Asta’s stream state machine parses for UI display.When to use:- Comparing multiple models
- Accessing models not available elsewhere
- Using reasoning models like Kimi k2.5
- Vision preprocessing for non-vision providers
Ollama (Local)
Ollama
File: Model Capabilities:
Asta detects tool-capable Ollama models automatically. Recommended tool-capable models:
backend/app/providers/ollama.pyUnique Features:- Runs models locally on your machine
- No API key required
- Complete privacy (no data sent to cloud)
- Works offline
- Free to use
llama3.2(3B, 1B)mistral(7B)qwen2.5-coder(7B)
- Privacy-sensitive tasks
- Offline work
- Learning and experimentation
- Avoiding API costs
OpenAI
OpenAI
File: When to use:
backend/app/providers/openai.pyUnique Features:- Production-grade reliability
- Vision support
- Tool calling
- Streaming responses
- Production applications requiring stability
- When you have OpenAI credits
- Tool-heavy workflows
Groq
Groq
File: When to use:
backend/app/providers/groq.pyUnique Features:- Ultra-fast inference (500+ tokens/sec)
- Open-source models (Llama, Mixtral)
- Tool calling support
- Generous free tier
- When speed is critical
- Rapid prototyping and testing
- Batch processing of many requests
Vision Pipeline
Asta has a hybrid vision pipeline (backend/app/handler.py:_run_vision_preprocessor):
Native Vision Providers
Claude, Google, OpenAI receive images and PDFs directly:
- Images as base64-encoded content
- PDFs as native
documentblocks (Claude) or extracted text - No preprocessing required
Vision Preprocessor Fallback
Ollama, Groq (non-vision providers) use OpenRouter vision models:Fallback chain:
google/gemma-3-27b-it:freenvidia/nemotron-nano-12b-v2-vl:freegoogle/gemma-3-12b-it:freeopenrouter/auto
[VISION_ANALYSIS ...] into the user message.Reasoning and Thinking Modes
Asta supports advanced reasoning modes with provider-specific implementations:- Thinking Levels
- Reasoning Mode
- Telegram Commands
Configure in Settings → General → Thinking Level:
off- No thinking blocksminimal- Brief internal thoughtslow- Short reasoningmedium- Moderate reasoninghigh- Detailed reasoningxhigh- Extended thinking (Claude only)
Troubleshooting
Provider keeps getting auto-disabled
Provider keeps getting auto-disabled
Causes:
- Invalid API key → Check key in Settings
- Quota exceeded → Add credits or wait for reset
- Billing issue → Verify payment method
- Fix the underlying issue (add credits, update key)
- Go to Settings → Models
- Find the provider in runtime state
- Click Re-enable
Ollama not working
Ollama not working
Checklist:
- Ollama is installed:
ollama --version - Ollama service is running:
ollama list - Models are pulled:
ollama pull llama3.2 - Correct base URL: Check
OLLAMA_BASE_URLin Settings
Vision not working
Vision not working
For native vision providers (Claude, Google, OpenAI):
- Ensure the model supports vision (e.g.,
claude-3-5-sonnet,gemini-2.0-flash) - Check image format is supported (JPEG, PNG, WebP)
- Verify image size is within limits (< 5MB)
- Ensure OpenRouter API key is configured (used for vision preprocessing)
- Check OpenRouter has credits
All providers failing
All providers failing
Check:
- Internet connectivity
- API keys are valid (test in provider’s dashboard)
- No firewall blocking requests
- Check backend logs:
tail -f backend/backend.log
Best Practices
Cost Optimization
- Use Google Gemini for everyday tasks (free tier)
- Reserve Claude for complex reasoning
- Use Ollama for privacy and cost-free experimentation
- Monitor usage in provider dashboards
Performance
- Use Groq for speed-critical tasks
- Enable streaming for better UX
- Choose smaller models for simple tasks
- Use Ollama for low-latency local inference
Reliability
- Configure at least 2 providers with valid keys
- Keep fallback chain enabled
- Monitor runtime state in Settings
- Set up Ollama as ultimate fallback
Privacy
- Use Ollama for sensitive data
- Be aware of provider data policies
- Check provider terms for commercial use
- Consider on-premise deployments for compliance
Next Steps
Architecture
Understand how providers fit into Asta’s architecture
Skills System
Learn how skills leverage different provider capabilities
Quickstart
Get started with configuring your first provider
API Reference
See how to use providers via the API