Skip to main content
The 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.
The Anthropic and Google adapters are shipped behind optional peer dependencies — install the SDK only when you actually use that provider. If you only ship OpenAI, there is zero extra bundle cost.

Provider matrix

Gemini’s free tier is the genuinely $0 path. Great for prototyping or side projects.

Wiring examples

OpenAI

Anthropic (Claude)

Google Gemini

OpenAI-compatible endpoints (Grok, Azure, …)

Point the OpenAI adapter at the provider’s baseUrl:

Switch providers at runtime

The widget doesn’t care which provider you use — every adapter returns the same SendMessage function. Pick at request time with a small factory:
Set 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?

Never put your LLM API key in the browser. All three create*Handler functions are server-only — they hold the key in your Node process and never expose it to the widget. The <ProbotBot /> component’s sendMessage prop calls a same-origin /api/… route you own; that route calls the adapter.
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.