Skip to content

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

ProviderAPIpi-goNotes
AnthropicWithAPIKey (anthropic.go:372-374)
OpenAI Chatpassed via option.RequestOption
OpenAI Responses
Google GeminiWithAPIKey (google.go:39-41)
Claude CLI✅ via ANTHROPIC_API_KEY envinherits process env
Codex CLI✅ via Codex CLI authdelegated to the codex subprocess

OAuth

ProviderAPIpi-goNotes
Anthropic✅ Claude.ai OAuthauthorize 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 OAuthNewWithOAuth (oauth.go:114-119); endpoint https://auth.openai.com/oauth/token
OpenAI Responses⚠️ via the same OAuth as Chatnot 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

VariantAPIpi-goNotes
Anthropic on Bedrocknot implemented
Anthropic on Vertexnot implemented
OpenAI on Azure✅ Azure OpenAInot implemented
Google on Vertex AI✅ ADC / service accountpkg/ai/provider/google uses generativelanguage.googleapis.com only

Provider Documentation

pi-go Gaps

  • OpenAI Responses provider has no NewWithOAuth helper; would need to mirror the wiring from openai.
  • 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.