Providers & Models
PizzaPi is built on the pi coding agent, which supports 20+ AI providers out of the box. You can authenticate with a paid subscription via OAuth, set API keys, or add custom providers like Ollama or LM Studio for local models.
Supported Providers
Section titled “Supported Providers”Subscription Providers (OAuth)
Section titled “Subscription Providers (OAuth)”These providers use OAuth — authenticate with /login inside a session:
| Provider | Subscription |
|---|---|
| Anthropic | Claude Pro / Max |
| OpenAI | ChatGPT Plus / Pro (Codex) |
| GitHub Copilot | Copilot subscription |
| Google Gemini CLI | Free with Google account |
| Google Antigravity | Free with Google account |
API Key Providers
Section titled “API Key Providers”Set an environment variable or store the key in the auth file:
| Provider | Environment Variable |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
| Google Gemini | GEMINI_API_KEY |
| Azure OpenAI | AZURE_OPENAI_API_KEY |
| Google Vertex AI | Uses Application Default Credentials |
| Amazon Bedrock | AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY |
| Mistral | MISTRAL_API_KEY |
| Groq | GROQ_API_KEY |
| Cerebras | CEREBRAS_API_KEY |
| xAI | XAI_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| Vercel AI Gateway | AI_GATEWAY_API_KEY |
| Hugging Face | HF_TOKEN |
| Kimi For Coding | KIMI_API_KEY |
| MiniMax | MINIMAX_API_KEY |
Authentication
Section titled “Authentication”Using /login (Subscriptions)
Section titled “Using /login (Subscriptions)”Inside a PizzaPi session, type /login in the chat input. You’ll be prompted to select a provider and complete the OAuth flow in your browser. Tokens are stored in ~/.pi/agent/auth.json and auto-refresh when they expire.
Use /logout to clear stored credentials.
Using API Keys
Section titled “Using API Keys”Set the provider’s environment variable before starting PizzaPi:
export ANTHROPIC_API_KEY=sk-ant-...Or store it in the auth file at ~/.pi/agent/auth.json:
{ "anthropic": { "type": "api_key", "key": "sk-ant-..." }, "openai": { "type": "api_key", "key": "sk-..." }}The auth file is created with 0600 permissions (user read/write only). Auth file credentials take priority over environment variables.
Key Resolution
Section titled “Key Resolution”The key field in auth.json supports three formats:
| Format | Example | Description |
|---|---|---|
| Shell command | "!security find-generic-password -ws 'anthropic'" | Executes command, uses stdout |
| Environment variable | "MY_ANTHROPIC_KEY" | Reads the named env var |
| Literal value | "sk-ant-..." | Used directly |
Shell commands are useful for pulling keys from password managers:
{ "anthropic": { "type": "api_key", "key": "!op read 'op://vault/item/credential'" }}Credential Priority
Section titled “Credential Priority”When multiple sources provide credentials for the same provider:
- CLI
--api-keyflag (highest priority) auth.jsonentry (API key or OAuth token)- Environment variable
- Custom provider keys from
models.json
Switching Models
Section titled “Switching Models”In the Web UI
Section titled “In the Web UI”Use the /model command in the chat input to open the model selector. This shows all available models across your authenticated providers.
You can also cycle through a subset of models using the /cycle_model command, or change reasoning effort with /effort.
Setting Defaults
Section titled “Setting Defaults”Set your preferred default model in ~/.pi/agent/settings.json:
{ "defaultProvider": "anthropic", "defaultModel": "claude-sonnet-4-20250514", "defaultThinkingLevel": "medium"}Scoped Model Cycling
Section titled “Scoped Model Cycling”Limit which models appear when cycling:
{ "enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]}Custom Models
Section titled “Custom Models”Add local or custom models (Ollama, vLLM, LM Studio, proxies) via ~/.pi/agent/models.json. The file reloads each time you open /model — edit it mid-session without restarting.
Minimal Example (Ollama)
Section titled “Minimal Example (Ollama)”{ "providers": { "ollama": { "baseUrl": "http://localhost:11434/v1", "api": "openai-completions", "apiKey": "ollama", "models": [ { "id": "llama3.1:8b" }, { "id": "qwen2.5-coder:7b" } ] } }}Full Model Configuration
Section titled “Full Model Configuration”{ "providers": { "ollama": { "baseUrl": "http://localhost:11434/v1", "api": "openai-completions", "apiKey": "ollama", "models": [ { "id": "llama3.1:8b", "name": "Llama 3.1 8B (Local)", "reasoning": false, "input": ["text"], "contextWindow": 128000, "maxTokens": 32000, "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 } } ] } }}Supported API Types
Section titled “Supported API Types”| API | Use For |
|---|---|
openai-completions | Most compatible — Ollama, vLLM, LM Studio, OpenRouter |
openai-responses | OpenAI Responses API |
anthropic-messages | Anthropic Messages API |
google-generative-ai | Google Generative AI |
Provider Configuration Fields
Section titled “Provider Configuration Fields”| Field | Description |
|---|---|
baseUrl | API endpoint URL |
api | API type (see above) |
apiKey | API key (supports shell command, env var, or literal) |
headers | Custom headers (same resolution as apiKey) |
authHeader | Set true to add Authorization: Bearer <apiKey> |
models | Array of model definitions |
modelOverrides | Per-model overrides for built-in models |
Model Fields
Section titled “Model Fields”| Field | Required | Default | Description |
|---|---|---|---|
id | Yes | — | Model identifier passed to the API |
name | No | id | Human-readable label |
api | No | provider’s | Override API type for this model |
reasoning | No | false | Supports extended thinking |
input | No | ["text"] | Input types: ["text"] or ["text", "image"] |
contextWindow | No | 128000 | Context window (tokens) |
maxTokens | No | 16384 | Max output tokens |
cost | No | all zeros | Per-million-token costs |
OpenAI Compatibility
Section titled “OpenAI Compatibility”For servers with partial OpenAI compatibility, use the compat field at the provider or model level:
{ "providers": { "local-llm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false }, "models": [{ "id": "my-model" }] } }}This commonly applies to Ollama, vLLM, SGLang, and similar servers that don’t understand the developer role or reasoning_effort parameter.
Cloud Provider Setup
Section titled “Cloud Provider Setup”Azure OpenAI
Section titled “Azure OpenAI”export AZURE_OPENAI_API_KEY=...export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com# Optionalexport AZURE_OPENAI_API_VERSION=2024-02-01export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4oAmazon Bedrock
Section titled “Amazon Bedrock”# Option 1: AWS Profileexport AWS_PROFILE=your-profile
# Option 2: IAM Keysexport AWS_ACCESS_KEY_ID=AKIA...export AWS_SECRET_ACCESS_KEY=...
# Optional region (defaults to us-east-1)export AWS_REGION=us-west-2Google Vertex AI
Section titled “Google Vertex AI”gcloud auth application-default loginexport GOOGLE_CLOUD_PROJECT=your-projectexport GOOGLE_CLOUD_LOCATION=us-central1Overriding Built-in Providers
Section titled “Overriding Built-in Providers”Route a built-in provider through a proxy without redefining its models:
{ "providers": { "anthropic": { "baseUrl": "https://my-proxy.example.com/v1" } }}All built-in Anthropic models remain available — only the endpoint changes.