Capabilities
Authentication
API keys, OAuth flows, service accounts, cloud-native endpoints
Read this when
- Bootstrapping a provider with credentials
- Adding OAuth or service-account auth to a new provider
See also docs/concepts/auth/oauth.md for the design of pi-go’s OAuth transport. CLI credentials are stored at ~/.pigo/auth.json per CLAUDE.md.
API Key
| Provider | API | pi-go | Notes |
|---|---|---|---|
| Anthropic | ✅ | ✅ | WithAPIKey (anthropic.go:372-374) |
| OpenAI Chat | ✅ | ✅ | passed via option.RequestOption |
| OpenAI Responses | ✅ | ✅ | |
| Google Gemini | ✅ | ✅ | WithAPIKey (google.go:39-41) |
| Claude CLI | ✅ via ANTHROPIC_API_KEY env | ✅ | inherits process env |
| Codex CLI | ✅ via Codex CLI auth | ✅ | delegated to the codex subprocess |
OAuth
| Provider | API | pi-go | Notes |
|---|---|---|---|
| Anthropic | ✅ Claude.ai OAuth | ✅ | authorize endpoint https://claude.com/cai/oauth/authorize, token endpoint https://platform.claude.com/v1/oauth/token, beta header claude-code-20250219,oauth-2025-04-20 (oauth.go:111) |
| OpenAI Chat | ✅ ChatGPT OAuth | ✅ | NewWithOAuth (oauth.go:114-119); endpoint https://auth.openai.com/oauth/token |
| OpenAI Responses | ⚠️ via the same OAuth as Chat | ❌ | not implemented in this provider |
| Google Gemini | ✅ Vertex OAuth (gcloud) | ❌ | pkg/ai/provider/google is API-key only |
| Claude CLI | ✅ delegated to CLI’s own login | ✅ | |
| Codex CLI | ✅ delegated to CLI’s own login | ✅ |
Service Account / Cloud Endpoints
| Variant | API | pi-go | Notes |
|---|---|---|---|
| Anthropic on Bedrock | ✅ | ❌ | not implemented |
| Anthropic on Vertex | ✅ | ❌ | not implemented |
| OpenAI on Azure | ✅ Azure OpenAI | ❌ | not implemented |
| Google on Vertex AI | ✅ ADC / service account | ❌ | pkg/ai/provider/google uses generativelanguage.googleapis.com only |
Provider Documentation
- Anthropic — API keys
- Anthropic — OAuth applications
- Anthropic on Bedrock
- Anthropic on Vertex
- OpenAI — Authentication
- Azure OpenAI
- Google Gemini — API keys
- Google — gcloud OAuth
- Google Vertex AI auth
pi-go Gaps
- OpenAI Responses provider has no
NewWithOAuthhelper; would need to mirror the wiring fromopenai. - Google HTTP provider has no OAuth or service-account helper.
- No Bedrock / Vertex routing for Anthropic models.
- No Azure OpenAI variant.
- Login UX (browser redirect, code capture) lives in
cmd/pi; not exposed as a reusable library entry point.