Overview
RAPTOR uses LiteLLM to provide unified access to multiple LLM providers. Configuration supports automatic model selection, fallback chains, and custom model routing for different task types.Multi-Provider Support
Anthropic, OpenAI, Google Gemini, Mistral, and Ollama (local)
Automatic Model Selection
Best thinking model auto-selected from LiteLLM config
Fallback Chains
Automatic fallback to alternative models on failure
Task-Specific Routing
Route exploit generation to Opus, classification to Gemini
Quick Start
1. Install LiteLLM
2. Set API Keys
3. Run RAPTOR
- Detects available API keys
- Selects the best thinking model
- Configures fallback chains
- Tracks costs
Provider Configuration
Anthropic Claude
Models:claude-opus-4.5- Most capable, best for exploit generation ($15/M tokens)claude-sonnet-4.5- Balanced performance ($3/M tokens)
OpenAI GPT
Models:gpt-5.2- Latest GPT, strong reasoning ($5/M tokens)gpt-5.2-thinking- Extended thinking mode ($6/M tokens)
Google Gemini
Models:gemini-3-pro- High capability ($0.10/M tokens)gemini-3-deep-think- Reasoning mode ($0.20/M tokens)
Mistral
Models:mistral-large-latest- Largest model ($2/M tokens)
Ollama (Local Models)
Models: Any model you’ve pulled locallyllama3:70b- Meta’s Llama 3mistral:latest- Mistral 7Bqwen2.5:72b- Alibaba’s Qwendeepseek-coder:33b- DeepSeek Coder
LiteLLM Configuration File
Config File Location
RAPTOR searches for LiteLLM config in order:$LITELLM_CONFIG_PATHenvironment variable~/.config/litellm/config.yaml(XDG standard)~/Documents/ClaudeCode/litellm/config.yaml(dev default)/etc/litellm/config.yaml(system-wide, Linux/macOS only)
Config File Format
~/.config/litellm/config.yaml:Automatic Model Selection
RAPTOR reads your LiteLLM config and auto-selects the best thinking model: Selection priority:- Models with
supports_reasoning: trueget +10 score boost - Opus models preferred over others
- Latest versions preferred
- Exact model matches preferred over aliases
Fallback Configuration
Automatic Fallback Chains
RAPTOR builds fallback chains automatically based on available API keys:Same-Tier Fallback Rule
Fallback stays within same tier:- Cloud → Cloud: Anthropic fails → try OpenAI → try Gemini
- Local → Local: llama3:70b fails → try mistral:latest → try qwen2.5:72b
- Cloud ❌ Local: Claude fails → does NOT fall back to Ollama
- Local ❌ Cloud: Ollama fails → does NOT fall back to Claude
Custom Fallback Chain
Disable Fallback
Task-Specific Model Routing
Specialized Models
Route different tasks to different models based on capability and cost:Task Type Reference
Retry and Rate Limiting
Retry Configuration
Quota Detection
Automatic detection of quota/rate limit errors:Advanced Configuration
Temperature and Sampling
Max Tokens
Timeout
Custom API Base
Example Configurations
High-Capability, High-Cost
Balanced (Recommended)
Low-Cost
Zero-Cost (Local)
Troubleshooting
error
Error:Fix: Set at least one API key:
error
Error:Fix:
warning
Symptom: Auto-selection falls back to manual API key detectionCause: LiteLLM config file not found or emptyFix: Create
~/.config/litellm/config.yaml (see Config File Format above)error
Error:Fix:
error
Symptom: LiteLLM error about unknown modelCause: Using underlying model ID instead of LiteLLM aliasWrong:Correct:
Further Reading
LiteLLM Documentation
Official LiteLLM documentation and model support
Provider Setup Guides
Detailed setup for each LLM provider
Cost Tracking
Budget enforcement and cost optimization strategies
Configuration Reference
Complete configuration options reference