Providers
openprogram providers available also lists hundreds of OpenAI-compatible community entries, configured the same way.
| Provider | Protocol | Access | Notes |
|---|---|---|---|
anthropic | Anthropic Messages | ANTHROPIC_API_KEY | Explicit caching, cache_control, 1h TTL supported |
openai | OpenAI Responses | OPENAI_API_KEY | Automatic caching, prompt_cache_key |
openai_responses openai_completions | Responses, Chat Completions | Shared implementations | Reused by many providers |
openai_codex | ChatGPT backend | OAuth (ChatGPT subscription), or import a codex login | Live model list |
azure_openai_responses | Azure OpenAI Responses | AZURE_OPENAI_API_KEY and your base URL | |
google | Google Generative AI | GEMINI_API_KEY, GOOGLE_API_KEY | Thinking by token budget |
google_gemini_cli | Cloud Code Assist | CLI credentials: reads ~/.gemini/oauth_creds.json; the Gemini CLI refreshes | |
gemini_subscription | Cloud Code Assist | CLI credentials: imports the same file | Aliases gemini, gemini-cli |
amazon_bedrock | Bedrock Converse Stream | Cloud credential chain, detected at runtime | Explicit caching, cachePoint |
github_copilot | OpenAI Responses and others | GitHub device code or token import | No thinking effort |
deepseek | OpenAI Completions | DEEPSEEK_API_KEY | Reasoner effort not adjustable |
openrouter | OpenAI Completions | OPENROUTER_API_KEY | Gateway |
vercel_ai_gateway | Anthropic Messages | AI_GATEWAY_API_KEY | Gateway |
groq | OpenAI Completions | GROQ_API_KEY | |
cerebras | OpenAI Completions | CEREBRAS_API_KEY | |
mistral | OpenAI Completions | MISTRAL_API_KEY | |
xai | OpenAI Completions | XAI_API_KEY | |
xai_subscription | OpenAI Responses | OAuth (SuperGrok, X Premium+), browser PKCE | Same models as xai, via cli-chat-proxy.grok.com. Keeps the selected model ID: grok-4.6 is not replaced by grok-build. |
zai | OpenAI Completions | ZAI_API_KEY | |
huggingface | OpenAI Completions | HF_TOKEN | |
minimax minimax_cn | Anthropic Messages | MINIMAX_API_KEY, MINIMAX_CN_API_KEY | International, China |
minimax_cn_coding_plan | Anthropic Messages | MINIMAX_CN_API_KEY, MINIMAX_API_KEY | MiniMax Token Plan (CN), same account as minimax_cn |
kimi_coding | Anthropic Messages | KIMI_API_KEY, MOONSHOT_API_KEY | |
alibaba_token_plan_cn | OpenAI Completions | Plan API key | Alias bailian |
opencode | OpenAI Completions and others | OPENCODE_API_KEY | |
opencode_go | OpenAI Completions | OPENCODE_API_KEY | |
atlascloud | OpenAI Completions | ATLASCLOUD_API_KEY | |
ollama lmstudio vllm llamacpp local | OpenAI Completions | Optional key | Local models |
API keys are imported into the credential store: Authentication. Every provider streams. Multimodal input is per model; trust the UI. Prompt caching is verified in code only where noted.
Custom providers
Settings → Model services: a display name and base URL are required; an id is derived from the name if omitted. https://api.example.com resolves to /v1; an explicit path such as /compatible-mode/v1 is kept. Fetch models browses the endpoint's /models. Stored as providers.<id> with source: "custom".
Which session uses which model
Settings → Model services opens on Overview, a map for now, 24 hours or 7 days.
| Left | Right |
|---|---|
| Sessions answering or calling a model in the window; under each, branches, sub-agents and child sessions from program runs. Session-less calls such as titling sit under Background calls. | Models in use, by provider |
| Mark | Meaning |
|---|---|
| Blue line, moving dot | Request in flight |
| Orange dashed line | Model that failed and was switched away from |
| Note beside a provider | Key cooling down, or needs fixing |
Hover a row to pick out its lines. Click a session to open it, a provider for its settings. Recent model switches below lists each with its reason. Sessions with no call in the window are only counted. The map needs a wide pane.
Fallback models
For a model that is rate limited, overloaded, down or unreachable. Set under Settings → Model services → Behavior, or:
openprogram config set model_fallback.mode same-provider
openprogram config set model_fallback.models '["anthropic/claude-sonnet-5-5", "openai/gpt-5.5"]'
model_fallback.mode | On such a failure |
|---|---|
off (default) | The error is shown |
same-provider | Up to two other enabled models from that provider, in settings order. No other provider is contacted. |
list | model_fallback.models in order; other providers allowed |
A switch happens only before any reply text. Authentication errors, invalid requests, a full context window and content-policy refusals are not retried. OPENPROGRAM_FALLBACK_MODELS overrides the setting.
Redacting secrets in requests
Off by default. Redact secrets in requests under Settings → Model services → Behavior, or openprogram config set privacy.redact_requests true. Before each request these become placeholders such as [[SECRET_1]], [[EMAIL_2]]:
- API keys and tokens with a recognizable shape: Anthropic, OpenAI, GitHub, AWS, Google, Slack, JWTs
- Private key blocks
- The value in
password=…,api_key: …,Authorization: Bearer …and similar - Email addresses
The reply and its tool calls get real values back first, so a command written with [[SECRET_1]] runs with the key. The mapping lives in memory for one request. A password in free text with no assignment is sent as is.
Library use
from openprogram.runtime.agent.runtime.factory import create_runtime
runtime = create_runtime() # first available provider
runtime = create_runtime(provider="anthropic", model="claude-sonnet-4-6") # Anthropic API key
runtime = create_runtime(provider="openai", model="gpt-4.1") # OpenAI Responses
runtime = create_runtime(provider="gemini", model="gemini-2.5-flash") # Google Generative AI
runtime = create_runtime(provider="openai-codex") # ChatGPT subscription
runtime = create_runtime(provider="gemini-cli") # Gemini CLI login
Those five have bespoke behavior. Every other provider routes by the model's protocol, as in chat.