LLM Providers: Claude, GPT, Gemini, Ollama & More
PocketPaw supports eight LLM providers, from free local models to cloud APIs and multi-provider proxies. This guide covers everything: which provider to pick, which models to use, how they interact with agent backends, and how to configure them.
Quick Start: Which Provider Should I Use?
| Goal | Provider | Cost | Recommended Backend |
|---|---|---|---|
| Best quality, zero config | Anthropic | Paid API | Claude Agent SDK |
| Free cloud API, great quality | Gemini | Free tier available | Google ADK |
| Fully local, no cloud | Ollama | Free | Claude Agent SDK or OpenAI Agents |
| Use OpenAI models | OpenAI | Paid API | OpenAI Agents or Codex CLI |
| GitHub Copilot subscription | Copilot | Subscription | Copilot SDK |
| 100+ models, single API | OpenRouter | Pay-per-token | OpenAI Agents |
| 100+ providers via proxy | LiteLLM | Varies | Any backend |
| Custom endpoint (vLLM, TGI, etc.) | OpenAI-Compatible | Varies | OpenAI Agents |
New to PocketPaw? Start with Gemini (free) or Anthropic (best quality). You can switch providers at any time from Settings without losing data.
Provider Details
Anthropic (Default)
The recommended provider for maximum capability. Claude models excel at coding, tool use, and complex reasoning.
Configuration:
export POCKETPAW_LLM_PROVIDER="anthropic"export POCKETPAW_ANTHROPIC_API_KEY="sk-ant-..."export POCKETPAW_ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"Available Models:
| Model | ID | Best For |
|---|---|---|
| Claude Sonnet 4.5 | claude-sonnet-4-5-20250929 | Best balance of speed and quality (default) |
| Claude Opus 4.5 | claude-opus-4-5-20250929 | Most capable, complex reasoning |
| Claude Haiku 4.5 | claude-haiku-4-5-20250929 | Fastest, cheapest, simple tasks |
| Claude Sonnet 4 | claude-sonnet-4-20250514 | Previous-gen balanced model |
| Claude Opus 4 | claude-opus-4-20250514 | Previous-gen flagship |
Get an API key at console.anthropic.com.
Gemini
Google’s Gemini models via their OpenAI-compatible API. Free tier available with generous limits. Internally, PocketPaw routes Gemini through the OpenAI-compatible code path using Google’s endpoint at https://generativelanguage.googleapis.com/v1beta/openai/.
Configuration:
export POCKETPAW_LLM_PROVIDER="gemini"export POCKETPAW_GOOGLE_API_KEY="AIza..."export POCKETPAW_GEMINI_MODEL="gemini-2.5-flash"Available Models:
| Model | ID | Best For |
|---|---|---|
| Gemini 2.5 Flash | gemini-2.5-flash | Best price-performance (default) |
| Gemini 2.5 Pro | gemini-2.5-pro | State-of-the-art reasoning |
| Gemini 2.5 Flash Lite | gemini-2.5-flash-lite | Fastest, cheapest |
| Gemini 3 Pro | gemini-3-pro-preview | Latest flagship (preview) |
| Gemini 3 Flash | gemini-3-flash-preview | Latest fast model (preview) |
Get a free API key at AI Studio. The same key is also used for PocketPaw’s image generation tool.
Gemini 2.0 Flash and 2.0 Flash Lite are deprecated and will be retired on March 31, 2026. Use 2.5 Flash or newer.
For the best Gemini experience, use the Google ADK backend which has native Gemini support. You can also use Gemini via the OpenAI Agents backend through Google’s OpenAI-compatible endpoint.
Ollama (Local)
Run models entirely on your machine. No API keys, no cloud, no costs. Requires Ollama installed and running.
Configuration:
export POCKETPAW_LLM_PROVIDER="ollama"export POCKETPAW_OLLAMA_HOST="http://localhost:11434"export POCKETPAW_OLLAMA_MODEL="llama3.2"Recommended Models:
| Model | ollama pull | Parameters | Best For |
|---|---|---|---|
| Llama 3.2 | ollama pull llama3.2 | 3B | Fast, general use (default) |
| Llama 3.1 | ollama pull llama3.1 | 8B | Better quality, more VRAM |
| Qwen 2.5 Coder | ollama pull qwen2.5-coder | 7B | Coding tasks |
| Mistral | ollama pull mistral | 7B | General reasoning |
| DeepSeek Coder V2 | ollama pull deepseek-coder-v2 | 16B | Advanced coding |
Verify connectivity:
pocketpaw --check-ollamaThis runs 4 checks: server reachable, model available, API compatibility, and tool calling support.
Ollama automatically skips smart model routing since there’s only one model to route to.
OpenAI
Use OpenAI’s GPT models directly.
Configuration:
export POCKETPAW_LLM_PROVIDER="openai"export POCKETPAW_OPENAI_API_KEY="sk-..."export POCKETPAW_OPENAI_MODEL="gpt-4o"Available Models:
| Model | ID | Best For |
|---|---|---|
| GPT-4o | gpt-4o | Best overall (default) |
| GPT-4o Mini | gpt-4o-mini | Fast, cost-effective |
| o1 | o1 | Complex reasoning |
| o3-mini | o3-mini | Balanced reasoning |
For the best OpenAI experience, use the OpenAI Agents backend or Codex CLI backend, which are built for OpenAI models natively.
OpenAI-Compatible
Connect to any endpoint that implements the OpenAI Chat Completions API. This includes hosted services (OpenRouter, Together AI, Fireworks) and self-hosted servers (vLLM, LiteLLM, text-generation-inference).
Configuration:
export POCKETPAW_LLM_PROVIDER="openai_compatible"export POCKETPAW_OPENAI_COMPATIBLE_BASE_URL="https://openrouter.ai/api/v1"export POCKETPAW_OPENAI_COMPATIBLE_API_KEY="sk-or-..."export POCKETPAW_OPENAI_COMPATIBLE_MODEL="anthropic/claude-3.5-sonnet"export POCKETPAW_OPENAI_COMPATIBLE_MAX_TOKENS=0 # 0 = no limitPopular services:
| Service | Base URL | Notes |
|---|---|---|
| OpenRouter | https://openrouter.ai/api/v1 | 100+ models, pay-per-token |
| Together AI | https://api.together.xyz/v1 | Open-source models |
| Fireworks AI | https://api.fireworks.ai/inference/v1 | Fast inference |
| LiteLLM Proxy | http://localhost:4000/v1 | Self-hosted proxy to any provider |
| vLLM | http://localhost:8000/v1 | Self-hosted model serving |
Verify connectivity:
pocketpaw --check-openai-compatibleThis runs 2 checks: API connectivity and tool calling support.
The max_tokens setting (0 by default) controls the maximum output tokens per request. Set to 0 for no limit, which is recommended for most models.
OpenAI-Compatible endpoints work best with the OpenAI Agents backend. They also work with the Claude Agent SDK if the endpoint implements the Anthropic Messages API format (e.g., LiteLLM proxy).
OpenRouter
OpenRouter provides access to 100+ models from multiple providers through a single API. It has a dedicated adapter in PocketPaw with proper authentication handling.
Configuration:
export POCKETPAW_LLM_PROVIDER="openrouter"export POCKETPAW_OPENROUTER_API_KEY="sk-or-v1-..."export POCKETPAW_OPENROUTER_MODEL="anthropic/claude-sonnet-4-6"How it differs from OpenAI-Compatible: While you can use OpenRouter via the generic OpenAI-Compatible provider, the dedicated openrouter provider handles authentication correctly for both the OpenAI and Anthropic API formats. OpenRouter uses ANTHROPIC_AUTH_TOKEN (not ANTHROPIC_API_KEY) for Anthropic-format requests, and the adapter manages this automatically.
Popular models:
| Model | Slug | Provider |
|---|---|---|
| Claude Sonnet 4.6 | anthropic/claude-sonnet-4-6 | Anthropic |
| GPT-4o | openai/gpt-4o | OpenAI |
| Gemini 2.5 Flash | google/gemini-2.5-flash | |
| Llama 3.1 405B | meta-llama/llama-3.1-405b-instruct | Meta |
| DeepSeek V3 | deepseek/deepseek-chat | DeepSeek |
Get an API key at openrouter.ai/keys. OpenRouter supports pay-per-token with no monthly minimums.
LiteLLM (100+ Providers)
LiteLLM is a unified interface to 100+ LLM providers including HuggingFace, Ollama, vLLM, Together AI, Groq, Mistral, and more. PocketPaw supports LiteLLM across all four major backends.
Two modes of operation:
- Proxy mode (recommended): Run a LiteLLM proxy server and point PocketPaw at it. The proxy handles model routing, load balancing, and provider-specific authentication.
- Direct SDK mode: LiteLLM SDK calls providers directly. Requires LiteLLM-prefixed model names (e.g.,
anthropic/claude-sonnet-4-6).
Configuration (proxy mode):
export POCKETPAW_LLM_PROVIDER="litellm"export POCKETPAW_LITELLM_API_BASE="http://localhost:4000"export POCKETPAW_LITELLM_API_KEY="sk-..." # your proxy master keyexport POCKETPAW_LITELLM_MODEL="gpt-4o" # model name as configured in the proxyexport POCKETPAW_LITELLM_MAX_TOKENS=0 # 0 = provider defaultConfiguration (direct SDK mode):
export POCKETPAW_LLM_PROVIDER="litellm"export POCKETPAW_LITELLM_API_BASE="" # leave empty for direct modeexport POCKETPAW_LITELLM_API_KEY="sk-ant-..." # the target provider's API keyexport POCKETPAW_LITELLM_MODEL="anthropic/claude-sonnet-4-6" # LiteLLM-prefixed nameBackend support:
| Backend | How LiteLLM is used |
|---|---|
| Claude Agent SDK | Routes through proxy via ANTHROPIC_BASE_URL |
| OpenAI Agents | Proxy mode: OpenAI-compat client. Direct mode: native LitellmModel |
| Google ADK | ADK’s LiteLlm model wrapper |
| Copilot SDK | Proxy as OpenAI-compatible BYOK endpoint |
Direct SDK mode requires prefixed model names. Without a proxy URL, LiteLLM uses the model name prefix to determine routing (e.g., anthropic/claude-sonnet-4-6, openai/gpt-4o). Without a prefix, LiteLLM may route to the wrong provider.
Start the LiteLLM proxy: litellm --config config.yaml --port 4000. See the LiteLLM docs for proxy setup.
Auto (Default)
When llm_provider is set to "auto" (the default), PocketPaw auto-detects the best available provider:
- Anthropic — if
POCKETPAW_ANTHROPIC_API_KEYis set - OpenAI — if
POCKETPAW_OPENAI_API_KEYis set - Ollama — fallback (no key needed)
This means PocketPaw works out of the box with Ollama if no API keys are configured.
Backend Compatibility Matrix
Each backend has different provider support. Here’s the full compatibility matrix:
| Provider | Claude SDK | OpenAI Agents | Google ADK | Codex CLI | OpenCode | Copilot SDK |
|---|---|---|---|---|---|---|
| Anthropic | Yes | No | No | No | N/A | Yes |
| Gemini | No | No | Yes | No | N/A | No |
| Ollama | Yes | Yes | No | No | N/A | No |
| OpenAI | No | Yes | No | Yes | N/A | Yes |
| OpenAI-Compatible | Partial | Yes | No | No | N/A | No |
| OpenRouter | Partial | Yes | No | No | N/A | No |
| LiteLLM | Yes | Yes | Yes | No | N/A | Yes |
| Feature | Claude SDK | OpenAI Agents | Google ADK | Codex CLI | OpenCode | Copilot SDK |
|---|---|---|---|---|---|---|
| MCP Support | Yes | No | Yes | Yes | No | No |
| Built-in Tools | 9 SDK tools | 3 tools | 2 tools | 4 tools | Server-managed | 4 tools |
| Streaming | Yes | Yes | Yes | Yes | Yes | Yes |
| Local Models | Ollama | Ollama | No | No | No | No |
Not sure which backend to use? Start with Claude Agent SDK (default) for Anthropic or Ollama. Use Google ADK for Gemini. Use OpenAI Agents for OpenAI models or Ollama with OpenAI-format APIs.
Claude Agent SDK (Recommended)
The default and most capable backend. Uses the official Claude Agent SDK with built-in agentic tools.
Important: API format requirement. The Claude SDK uses the Anthropic Messages API format. It only works with endpoints that understand this format — not endpoints that only speak OpenAI’s Chat Completions format.
| Provider | Works? | How |
|---|---|---|
| Anthropic | Yes | Native, just set ANTHROPIC_API_KEY |
| Ollama | Yes | Ollama v0.14+ implements the Anthropic Messages API natively |
| OpenRouter | Partial | Only if the model supports Anthropic format |
| LiteLLM | Yes | Routes through LiteLLM proxy via ANTHROPIC_BASE_URL |
| Gemini | No | Use Google ADK backend instead |
| OpenAI | No | Use OpenAI Agents backend instead |
| OpenAI-Compatible | Partial | Only if the endpoint speaks Anthropic format (e.g., LiteLLM proxy) |
Built-in SDK tools: Bash, Read, Write, Edit, Glob, Grep, WebSearch, WebFetch, Skill
Security: Uses PreToolUse hooks to intercept and block dangerous Bash commands before execution.
MCP servers: Fully supported. Supports stdio, SSE, and HTTP transports.
Best for: Anthropic and Ollama users who want maximum capability, coding tasks, and tool-heavy workflows.
OpenAI Agents SDK
OpenAI’s native agent framework with GPT model support and Ollama compatibility.
| Provider | Works? | How |
|---|---|---|
| OpenAI | Yes | Native with openai-agents SDK |
| Ollama | Yes | Via OpenAIChatCompletionsModel wrapper |
| OpenAI-Compatible | Yes | Custom base URL support |
| OpenRouter | Yes | Dedicated adapter with proper auth handling |
| LiteLLM | Yes | Proxy mode (OpenAI-compat) or direct LitellmModel |
Built-in tools: code_interpreter, file_search, computer_use
Best for: OpenAI model users, Ollama users who prefer OpenAI-format APIs, or anyone wanting access to 100+ models via OpenRouter or LiteLLM.
Google ADK
Google’s Agent Development Kit with native Gemini support.
| Provider | Works? | How |
|---|---|---|
| Gemini | Yes | Native via google-adk SDK |
| LiteLLM | Yes | ADK’s LiteLlm model wrapper for cross-provider support |
Built-in tools: google_search, code_execution
MCP servers: Native support via McpToolset (stdio, SSE, HTTP).
Best for: Gemini users who want native Google AI integration with MCP support. LiteLLM support enables using non-Gemini models with ADK’s tooling.
Other Backends
- Codex CLI — OpenAI’s Codex CLI for code-focused tasks. Requires
codexbinary. MCP support. - OpenCode — External server backend. Model managed by the OpenCode server.
- Copilot SDK — GitHub Copilot with multi-provider support (Copilot, OpenAI, Azure, Anthropic, LiteLLM).
Smart Model Routing
When using Anthropic as the provider, PocketPaw can automatically select the model size based on message complexity. This optimizes cost by using cheaper models for simple queries.
How It Works
Each incoming message is classified into a tier:
| Tier | Description | Default Model | When |
|---|---|---|---|
| Simple | Greetings, yes/no, quick facts | claude-haiku-4-5-20251001 | Short messages matching simple patterns |
| Moderate | General tasks, search, moderate reasoning | claude-sonnet-4-5-20250929 | Default fallback |
| Complex | Coding, debugging, multi-step planning | claude-opus-4-6 | Long messages or 1+ complex keywords |
Classification Signals
- Simple patterns: “hi”, “hello”, “thanks”, “what is X?”, “remind me”, short messages under 30 characters
- Complex signals: “plan”, “architect”, “debug”, “implement”, “analyze”, “optimize”, “research”
- Threshold: 1 complex signal + message > 30 chars = COMPLEX; 2+ complex signals = COMPLEX; > 400 chars = COMPLEX
Configuration
export POCKETPAW_SMART_ROUTING_ENABLED=trueexport POCKETPAW_MODEL_TIER_SIMPLE="claude-haiku-4-5-20251001"export POCKETPAW_MODEL_TIER_MODERATE="claude-sonnet-4-5-20250929"export POCKETPAW_MODEL_TIER_COMPLEX="claude-opus-4-6"Smart routing is automatically skipped for Ollama, Gemini, and OpenAI-Compatible providers since they use a single configured model.
Configuration Reference
All LLM-Related Settings
| Setting | Env Variable | Default | Description |
|---|---|---|---|
llm_provider | POCKETPAW_LLM_PROVIDER | auto | Provider selection |
anthropic_api_key | POCKETPAW_ANTHROPIC_API_KEY | — | Anthropic API key |
anthropic_model | POCKETPAW_ANTHROPIC_MODEL | claude-sonnet-4-5-20250929 | Anthropic model |
google_api_key | POCKETPAW_GOOGLE_API_KEY | — | Google API key (Gemini + image gen) |
gemini_model | POCKETPAW_GEMINI_MODEL | gemini-2.5-flash | Gemini model |
openai_api_key | POCKETPAW_OPENAI_API_KEY | — | OpenAI API key |
openai_model | POCKETPAW_OPENAI_MODEL | gpt-4o | OpenAI model |
ollama_host | POCKETPAW_OLLAMA_HOST | http://localhost:11434 | Ollama server URL |
ollama_model | POCKETPAW_OLLAMA_MODEL | llama3.2 | Ollama model |
openai_compatible_base_url | POCKETPAW_OPENAI_COMPATIBLE_BASE_URL | — | Endpoint URL |
openai_compatible_api_key | POCKETPAW_OPENAI_COMPATIBLE_API_KEY | — | Endpoint API key |
openai_compatible_model | POCKETPAW_OPENAI_COMPATIBLE_MODEL | — | Endpoint model name |
openai_compatible_max_tokens | POCKETPAW_OPENAI_COMPATIBLE_MAX_TOKENS | 0 | Max output tokens (0 = no limit) |
openrouter_api_key | POCKETPAW_OPENROUTER_API_KEY | — | OpenRouter API key (sk-or-v1-…) |
openrouter_model | POCKETPAW_OPENROUTER_MODEL | — | OpenRouter model slug |
litellm_api_base | POCKETPAW_LITELLM_API_BASE | http://localhost:4000 | LiteLLM proxy URL (empty = direct SDK mode) |
litellm_api_key | POCKETPAW_LITELLM_API_KEY | — | LiteLLM proxy master key or provider API key |
litellm_model | POCKETPAW_LITELLM_MODEL | — | Model name (proxy mode) or prefixed name (direct mode) |
litellm_max_tokens | POCKETPAW_LITELLM_MAX_TOKENS | 0 | Max output tokens (0 = provider default) |
smart_routing_enabled | POCKETPAW_SMART_ROUTING_ENABLED | true | Enable auto model selection |
model_tier_simple | POCKETPAW_MODEL_TIER_SIMPLE | claude-haiku-4-5-20251001 | Model for simple tasks |
model_tier_moderate | POCKETPAW_MODEL_TIER_MODERATE | claude-sonnet-4-5-20250929 | Model for moderate tasks |
model_tier_complex | POCKETPAW_MODEL_TIER_COMPLEX | claude-opus-4-6 | Model for complex tasks |
Setting via config.json
All settings can also be set in ~/.pocketpaw/config.json:
{ "llm_provider": "gemini", "gemini_model": "gemini-2.5-flash", "smart_routing_enabled": false}Setting via Dashboard
Open the web dashboard (default at http://localhost:8888) and go to Settings > General to select your provider and model from dropdown menus.
Security Notes
- API keys are encrypted at rest using Fernet + PBKDF2 in
~/.pocketpaw/secrets.enc. They are never stored in plaintext inconfig.json. - Environment variables override config file values and are never written to disk.
- The Gemini provider reuses the
google_api_keyfield, which is also used for image generation. One key covers both features.
Troubleshooting
Ollama: “Model not found”
ollama list # See available modelsollama pull llama3.2 # Download a modelpocketpaw --check-ollama # Run connectivity checkGemini: “API key invalid”
- Go to AI Studio and create/verify your key
- Make sure the key is saved in Settings > API Keys > Google API Key
- Ensure the Gemini API is enabled for your Google Cloud project
OpenAI-Compatible: “Cannot connect”
pocketpaw --check-openai-compatible # Run connectivity checkVerify:
- The base URL is correct and includes
/v1if needed - The server is running and accessible
- The model name matches what the endpoint expects
Wrong provider being used
If llm_provider is "auto", PocketPaw picks the first available key (Anthropic > OpenAI > Ollama). Set an explicit provider to override:
export POCKETPAW_LLM_PROVIDER="gemini"