Providers

August 21, 2026 · View on GitHub

This page lists the provider implementations built into the repository (one subdirectory each under openprogram/providers/), how each one is accessed, and how to use providers directly from Python code. Beyond the built-in implementations, openprogram providers available also lists hundreds of community provider catalog entries that speak the OpenAI-compatible protocol; they are configured the same way.

Built-in providers

Access methods: API key = a key stored in the credential store (providers login <id>, also importable from environment variables); OAuth = browser / device-code login with a subscription account; CLI credentials = reads the credential file of an external CLI that is already logged in; cloud credential chain = resolved at runtime through the cloud vendor's standard credential chain.

ProviderProtocolAccessNotes
anthropicAnthropic MessagesAPI key (ANTHROPIC_API_KEY) or OAuth (Claude subscription, PKCE / pasting a claude setup-token)Explicit prompt caching (cache_control, 1h TTL supported)
openaiOpenAI ResponsesAPI key (OPENAI_API_KEY)Automatic caching on the Responses protocol (prompt_cache_key)
openai_responses / openai_completionsOpenAI Responses / Chat Completions— (shared protocol implementations, reused by many providers)
openai_codexChatGPT backendOAuth (ChatGPT subscription): browser PKCE sign-in; an existing codex CLI login can also be imported via providers discoverModel list pulled live from the official endpoint
azure_openai_responsesAzure OpenAI ResponsesAPI key (AZURE_OPENAI_API_KEY) + a base URL you supply
googleGoogle Generative AIAPI key (GEMINI_API_KEY / GOOGLE_API_KEY)Thinking controlled via a token budget
google_gemini_cliCloud Code AssistCLI credentials: reads ~/.gemini/oauth_creds.json directly; the Gemini CLI handles refreshing
gemini_subscriptionCloud Code AssistCLI credentials: imports ~/.gemini/oauth_creds.json (log in with the Gemini CLI first)Aliases gemini, gemini-cli
amazon_bedrockBedrock Converse StreamCloud credential chain (AWS_PROFILE / access keys / bearer token, etc., detected at runtime)Explicit prompt caching (cachePoint)
github_copilotOpenAI Responses and othersGitHub device-code OAuth in the browser, or import a token from COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN; exchanged on demand for a short-lived Copilot token that is never written to diskNo thinking-effort support
deepseekOpenAI CompletionsAPI key (DEEPSEEK_API_KEY)Reasoning is not adjustable on reasoner models
openrouterOpenAI CompletionsAPI key (OPENROUTER_API_KEY)Aggregation gateway
vercel_ai_gatewayAnthropic MessagesAPI key (AI_GATEWAY_API_KEY)Aggregation gateway
groqOpenAI CompletionsAPI key (GROQ_API_KEY)
cerebrasOpenAI CompletionsAPI key (CEREBRAS_API_KEY)
mistralOpenAI CompletionsAPI key (MISTRAL_API_KEY)
xaiOpenAI CompletionsAPI key (XAI_API_KEY)
xai_subscriptionOpenAI CompletionsOAuth (SuperGrok / X Premium+): browser PKCE sign-inSame models as xai, via cli-chat-proxy.grok.com (not api.x.ai)
zaiOpenAI CompletionsAPI key (ZAI_API_KEY)
huggingfaceOpenAI CompletionsAPI key (HF_TOKEN)
minimax / minimax_cnAnthropic MessagesAPI key (MINIMAX_API_KEY / MINIMAX_CN_API_KEY)International / China endpoints
minimax_cn_coding_planAnthropic MessagesAPI key (MINIMAX_CN_API_KEY / MINIMAX_API_KEY — same account and key as minimax_cn)"MiniMax Token Plan (CN)" coding subscription
kimi_codingAnthropic MessagesAPI key (KIMI_API_KEY / MOONSHOT_API_KEY)
alibaba_token_plan_cnOpenAI CompletionsPlan API keyAlias bailian
opencodeOpenAI Completions and othersAPI key (OPENCODE_API_KEY)

Streaming output is supported by every provider (the whole layer is built on the streaming interface). Multimodal input is decided per model rather than per provider, based on each provider's model catalog data; trust what the UI shows for a given model. Prompt caching has been verified in code only where noted in the table above.

Empty directories such as claude_code, chatgpt_subscription, and claude_max_proxy are alias placeholders (claude-maxclaude-code, chatgpt-subscriptionopenai-codex); their behavior is decided by the alias table, not by a separate implementation. minimax_cn_coding_plan is likewise config-driven with no code of its own.

Custom providers

Any OpenAI-compatible endpoint the table does not cover can be added from the Web UI under Settings → Providers: a display name and a base URL are the only required fields (an id is derived from the name if you don't give one). A host-only URL such as https://api.example.com resolves to the conventional /v1 API root; an explicit path such as /compatible-mode/v1 is preserved. The endpoint's /models list is then browsable with the same Fetch button as built-in providers, and enabled models use the same resolved base URL at runtime. Custom providers are stored in config as providers.<id> with source: "custom".

Using providers as a library

To create a runtime in your own Python code, prefer auto-detection:

from openprogram.providers.registry import create_runtime

runtime = create_runtime()                                        # picks the first available provider
runtime = create_runtime(provider="anthropic", model="claude-sonnet-4-6")

Six providers have bespoke runtime behavior behind create_runtime (OAuth / CLI-credential adoption, per-provider conventions):

runtime = create_runtime(provider="anthropic", model="claude-sonnet-4-6")  # Anthropic API key
runtime = create_runtime(provider="openai", model="gpt-4.1")               # OpenAI Responses API
runtime = create_runtime(provider="gemini", model="gemini-2.5-flash")      # Google Generative AI
runtime = create_runtime(provider="claude-code")   # Claude subscription direct connection, no API key needed
runtime = create_runtime(provider="openai-codex")  # ChatGPT subscription (Codex OAuth)
runtime = create_runtime(provider="gemini-cli")    # reuses the Gemini CLI login state

Every other provider in the table above routes automatically by the model's protocol: create_runtime(provider=..., model=...) uses the same path as the chat UI.