Final rebrand: rename remaining Rust source file to complete the gsd → forge transition. All parser references already use forge_parser after earlier commits. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Providers & Models — Multi-Model by Default
Pi isn't locked to one provider. It supports 20+ providers out of the box and lets you add more.
Authentication Methods
OAuth subscriptions (via /login):
- Anthropic Claude Pro/Max
- OpenAI ChatGPT Plus/Pro (Codex)
- GitHub Copilot
- Google Gemini CLI
- Google Antigravity
API keys (via environment variables):
- Anthropic, Anthropic (Vertex AI), OpenAI, Azure OpenAI, Google Gemini, Google Vertex, Amazon Bedrock
- Mistral, Groq, Cerebras, xAI, OpenRouter, Vercel AI Gateway
- ZAI, OpenCode Zen, OpenCode Go, Hugging Face, Kimi, MiniMax
Model Switching
You can switch models at any time during a conversation:
/model— Open the model selectorCtrl+L— Same as/modelCtrl+P/Shift+Ctrl+P— Cycle through scoped modelsShift+Tab— Cycle thinking level
Model changes are recorded in the session as model_change entries, so when you resume a session, pi knows which model you were using.
CLI Model Selection
pi --model sonnet # Fuzzy match
pi --model openai/gpt-4o # Provider/model
pi --model sonnet:high # With thinking level
pi --models "claude-*,gpt-4o" # Scope models for Ctrl+P cycling
pi --list-models # List all available
pi --list-models gemini # Search by name
Custom Providers
Add providers via ~/.sf/agent/models.json (simple) or extensions (advanced with OAuth, custom streaming):
// ~/.sf/agent/models.json
{
"providers": [{
"name": "my-proxy",
"baseUrl": "https://proxy.example.com",
"apiKey": "PROXY_API_KEY",
"api": "anthropic-messages",
"models": [{ "id": "claude-sonnet-4", "name": "Sonnet via Proxy", ... }]
}]
}