probot-self-hosted npm package is model-agnostic. The React widget
never touches an API key — you own the transport, we own the UI. This page
walks through every supported provider, where to get its key, which
adapter to import, and how to switch providers at runtime.
Which adapter to import
OpenAI
createOpenAIHandler — GPT models via the official OpenAI API.Anthropic (Claude)
createAnthropicHandler — Claude models via Anthropic’s API.Google (Gemini)
createGoogleHandler — Gemini models via Google’s Generative AI API.OpenAI-compatible
createOpenAIHandler with baseUrl — Grok, Azure OpenAI, LM
Studio, together.ai, DeepSeek, Mistral, and any other API that speaks
the OpenAI Chat Completions protocol.Provider matrix
Wiring examples
OpenAI
Anthropic (Claude)
Google Gemini
OpenAI-compatible endpoints (Grok, Azure, …)
Point the OpenAI adapter at the provider’sbaseUrl:
Switch providers at runtime
The widget doesn’t care which provider you use — every adapter returns the sameSendMessage function. Pick at request time with a small factory:
PROBOT_PROVIDER=anthropic PROBOT_MODEL=claude-sonnet-4-5 in your
environment, redeploy, and the widget starts calling Claude Sonnet on the
next visitor turn. No client-side change.
For truly per-request switching (A/B tests, cost-tiering by user), replace
the module-level send with resolveHandler() inside the POST handler
and read the provider from a request header, cookie, or feature-flag
client.
Where does the key live?
Compared to a managed pro-bot.dev bot (where the platform holds an envelope-encrypted copy of your key), the self-hosted path keeps the key entirely inside your infra. Nothing on pro-bot.dev — not even the platform operators — can read it.Compared to a managed bot
Managed bots on pro-bot.dev pick a model via Settings → AI Model & Key in the dashboard. Switching = change the setting, save. The widget re-reads the current model on every chat request. Self-hosted bots skip the dashboard for model config and give you the same flexibility inside your own backend — swap providers by changing an env var, and the widget doesn’t need to know.Managed bot: dashboard setup
How to configure a managed bot’s provider + model + key in the
ProBot dashboard.
Self-hosted quickstart
The full setup guide for the
probot-self-hosted npm package.