Skip to content

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.


These providers use OAuth — authenticate with /login inside a session:

ProviderSubscription
AnthropicClaude Pro / Max
OpenAIChatGPT Plus / Pro (Codex)
GitHub CopilotCopilot subscription
Google Gemini CLIFree with Google account
Google AntigravityFree with Google account

Set an environment variable or store the key in the auth file:

ProviderEnvironment Variable
AnthropicANTHROPIC_API_KEY
OpenAIOPENAI_API_KEY
Google GeminiGEMINI_API_KEY
Azure OpenAIAZURE_OPENAI_API_KEY
Google Vertex AIUses Application Default Credentials
Amazon BedrockAWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY
MistralMISTRAL_API_KEY
GroqGROQ_API_KEY
CerebrasCEREBRAS_API_KEY
xAIXAI_API_KEY
OpenRouterOPENROUTER_API_KEY
Vercel AI GatewayAI_GATEWAY_API_KEY
Hugging FaceHF_TOKEN
Kimi For CodingKIMI_API_KEY
MiniMaxMINIMAX_API_KEY

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.

Set the provider’s environment variable before starting PizzaPi:

Terminal window
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.

The key field in auth.json supports three formats:

FormatExampleDescription
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'" }
}

When multiple sources provide credentials for the same provider:

  1. CLI --api-key flag (highest priority)
  2. auth.json entry (API key or OAuth token)
  3. Environment variable
  4. Custom provider keys from models.json

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.

Set your preferred default model in ~/.pi/agent/settings.json:

{
"defaultProvider": "anthropic",
"defaultModel": "claude-sonnet-4-20250514",
"defaultThinkingLevel": "medium"
}

Limit which models appear when cycling:

{
"enabledModels": ["claude-*", "gpt-4o", "gemini-2*"]
}

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.

{
"providers": {
"ollama": {
"baseUrl": "http://localhost:11434/v1",
"api": "openai-completions",
"apiKey": "ollama",
"models": [
{ "id": "llama3.1:8b" },
{ "id": "qwen2.5-coder:7b" }
]
}
}
}
{
"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 }
}
]
}
}
}
APIUse For
openai-completionsMost compatible — Ollama, vLLM, LM Studio, OpenRouter
openai-responsesOpenAI Responses API
anthropic-messagesAnthropic Messages API
google-generative-aiGoogle Generative AI
FieldDescription
baseUrlAPI endpoint URL
apiAPI type (see above)
apiKeyAPI key (supports shell command, env var, or literal)
headersCustom headers (same resolution as apiKey)
authHeaderSet true to add Authorization: Bearer <apiKey>
modelsArray of model definitions
modelOverridesPer-model overrides for built-in models
FieldRequiredDefaultDescription
idYesModel identifier passed to the API
nameNoidHuman-readable label
apiNoprovider’sOverride API type for this model
reasoningNofalseSupports extended thinking
inputNo["text"]Input types: ["text"] or ["text", "image"]
contextWindowNo128000Context window (tokens)
maxTokensNo16384Max output tokens
costNoall zerosPer-million-token costs

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.


Terminal window
export AZURE_OPENAI_API_KEY=...
export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
# Optional
export AZURE_OPENAI_API_VERSION=2024-02-01
export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
Terminal window
# Option 1: AWS Profile
export AWS_PROFILE=your-profile
# Option 2: IAM Keys
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
# Optional region (defaults to us-east-1)
export AWS_REGION=us-west-2
Terminal window
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT=your-project
export GOOGLE_CLOUD_LOCATION=us-central1

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.