Documentation Index
Fetch the complete documentation index at: https://mintlify.com/badlogic/pi-mono/llms.txt
Use this file to discover all available pages before exploring further.
LLM Providers
The library supports 15+ LLM providers with unified authentication and configuration. All providers work through the same API surface.Supported Providers
API Key Providers
These providers use static API keys for authentication:OpenAI
OpenAI
Models: GPT-4o, GPT-4o-mini, o1-preview, o1-mini, o3-miniAPI:
openai-responses (Responses API)Features: Vision, reasoning, tool callingSetup:Anthropic
Anthropic
Models: Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude Sonnet 4API: For Claude Pro/Max subscribers, use OAuth (see OAuth section).
anthropic-messages (Messages API)Features: Vision, thinking (Sonnet 4), tool calling, prompt cachingSetup:Google
Models: Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini 2.0 Flash, Gemini 2.5 FlashAPI: Note: Google provider does not support function call streaming. You receive a single
google-generative-ai (Generative AI API)Features: Vision, thinking, tool callingSetup:toolcall_delta event with complete arguments.xAI (Grok)
xAI (Grok)
Models: Grok Beta, Grok Code Fast, Grok Vision BetaAPI:
openai-completions (OpenAI-compatible)Features: Vision, reasoning, tool callingSetup:Groq
Groq
Models: Llama 3.3 70B, Llama 3.1 70B, Mixtral 8x7B, GPT-OSS modelsAPI:
openai-completions (OpenAI-compatible)Features: Extremely fast inference, tool callingSetup:Cerebras
Cerebras
Models: Llama 3.3 70B, Llama 3.1 70B, GPT-OSS modelsAPI:
openai-completions (OpenAI-compatible)Features: Fast inference, tool callingSetup:Mistral
Mistral
Models: Mistral Large, Mistral Small, Codestral, PixtralAPI: Note: Mistral requires tool call IDs to be exactly 9 alphanumeric characters. The library handles this automatically.
openai-completions (OpenAI-compatible)Features: Vision (Pixtral), tool callingSetup:OpenRouter
OpenRouter
Models: Access to 100+ models from multiple providersAPI:
openai-completions (OpenAI-compatible)Features: Multi-provider routing, fallback supportSetup:Amazon Bedrock
Amazon Bedrock
Models: Claude models via AWS BedrockAPI:
bedrock-converse-stream (Bedrock Converse API)Features: Vision, tool calling, AWS authenticationSetup: Uses AWS SDK credentials (IAM roles, profiles, or environment variables)MiniMax
MiniMax
Models: MiniMax models (Chinese provider)API:
openai-completions (OpenAI-compatible)Setup:Kimi For Coding
Kimi For Coding
Models: Moonshot AI models with Anthropic-compatible APIAPI:
openai-completions (OpenAI-compatible)Setup:Vercel AI Gateway
Vercel AI Gateway
Models: Multi-provider gateway with caching and analyticsAPI:
openai-completions (OpenAI-compatible)Setup:Azure OpenAI
Azure OpenAI
Models: GPT-4o, GPT-4o-mini via AzureAPI:
azure-openai-responses (Responses API)Setup:OAuth Providers
These providers require OAuth authentication:OpenAI Codex
OpenAI Codex
Models: GPT-5 Mini, GPT-5 Nano, GPT-5.1 Omni (ChatGPT Plus/Pro subscription)API:
openai-codex-responses (Codex Responses API)Features: Extended reasoning, session-based caching, WebSocket supportSetup: See OAuth AuthenticationGitHub Copilot
GitHub Copilot
Models: GPT-4o, Claude 3.5 Sonnet (Copilot subscription)API:
openai-completions (OpenAI-compatible)Setup: See OAuth AuthenticationNote: If you get “model not supported” error, enable the model in VS Code Copilot Chat settings first.Google Gemini CLI
Google Gemini CLI
Models: Gemini 2.0 Flash, Gemini 2.5 Flash (via Cloud Code Assist)API:
google-gemini-cli (Cloud Code Assist API)Features: Free tier or paid subscription, thinking supportSetup: See OAuth AuthenticationAntigravity
Antigravity
Models: Free Gemini 3, Claude, GPT-OSS models (via Google Cloud)API:
openai-completions (OpenAI-compatible)Setup: See OAuth AuthenticationVertex AI
Vertex AI
Models: Gemini models via Google Cloud Vertex AIAPI: See OAuth Authentication for details.
google-vertex (Vertex AI API)Setup: Uses Application Default Credentials (ADC)Environment Variables
In Node.js, API keys can be set via environment variables:| Provider | Environment Variable |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Azure OpenAI | AZURE_OPENAI_API_KEY, AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME |
| Anthropic | ANTHROPIC_API_KEY or ANTHROPIC_OAUTH_TOKEN |
GEMINI_API_KEY | |
| Vertex AI | GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION (+ ADC) |
| 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 |
| MiniMax | MINIMAX_API_KEY |
| Kimi | KIMI_API_KEY |
| GitHub Copilot | COPILOT_GITHUB_TOKEN, GH_TOKEN, or GITHUB_TOKEN |
Checking API Keys
Browser Usage
In browsers, you must pass API keys explicitly:Custom Models
Create custom models for local inference servers:OpenAI Compatibility Settings
For OpenAI-compatible providers, you can override compatibility settings:supportsStore- Whether provider supports thestorefieldsupportsDeveloperRole- Whether provider supportsdeveloperrole vssystemsupportsReasoningEffort- Whether provider supportsreasoning_effortsupportsUsageInStreaming- Whether provider supports token usage in streamingmaxTokensField- Usemax_completion_tokensormax_tokensrequiresToolResultName- Whether tool results need thenamefieldrequiresAssistantAfterToolResult- Whether assistant message is required after tool resultsrequiresThinkingAsText- Whether thinking blocks must be text with<thinking>tagsrequiresMistralToolIds- Whether tool IDs must be Mistral format (9 alphanumeric chars)thinkingFormat- Reasoning param format:openai,zai, orqwensupportsStrictMode- Whether provider supportsstrictin tool definitions
Provider APIs
The library uses different APIs for different providers:openai-completions- OpenAI Chat Completions API (xAI, Groq, Cerebras, Mistral, OpenRouter, etc.)openai-responses- OpenAI Responses API (OpenAI)openai-codex-responses- OpenAI Codex Responses API (OpenAI Codex)azure-openai-responses- Azure OpenAI Responses API (Azure)anthropic-messages- Anthropic Messages API (Anthropic)google-generative-ai- Google Generative AI API (Google)google-gemini-cli- Google Cloud Code Assist API (Google Gemini CLI)google-vertex- Google Vertex AI API (Vertex AI)bedrock-converse-stream- Amazon Bedrock Converse API (Bedrock)
Next Steps
OAuth Setup
Configure OAuth for subscription providers
Streaming
Learn about streaming events and responses