Providers
OpenDocBot is provider-agnostic. Different providers are implementations of the same LLMProvider interface:
| Provider | Handles | Underlying protocol |
|---|---|---|
OpenAICompatibleProvider | OpenAI, Ollama, OpenRouter, OpenCode, Custom | Responses API + /chat/completions |
AnthropicProvider | Claude | Messages API (/v1/messages) |
GeminiProvider | Google Gemini | generateContent / streamGenerateContent |
A preset binds a provider to a concrete endpoint and default model. This ensures easy connection to different AI platforms. You can also configure a provider manually via the Custom preset.
Below is how to set up each preset, including where to get the API key.
OpenAI
Setup:
- Preset: OpenAI
- Create a key at https://platform.openai.com/api-keys
- Paste, Test Connection, Apply
The preset uses the Responses API (/responses). If you use a different model, pick it from the Model dropdown (fetched from /models).
Anthropic Claude
Setup:
- Preset: Anthropic Claude
- Create a key at https://console.anthropic.com/settings/keys
- Paste, Test Connection, Apply
- Optionally tune Prompt Caching in Advanced (TTL 5m vs 1h)
Google Gemini
Setup:
- Preset: Google Gemini
- Create a key at https://aistudio.google.com/apikey
- Paste, Test Connection, Apply
- Optionally tune Prompt Caching in Advanced (enable + rebuild size)
Model list
Gemini models are fetched from /models and filtered to gemini* (thinking variants like -thinking are skipped from the dropdown, but you can type one manually if you want it).
Ollama
Run a model locally with no API key and no data leaving your premises.
Prerequisites:
- Ollama installed and running (
ollama serve) - At least one model pulled, e.g.
ollama pull llama3.1
Setup:
- Preset: Ollama
- Adjust the endpoint in case it's needed. The default endpoint is
http://localhost:11434/v1 - No key required; the field is hidden
- Type your model name (the model list isn't auto-fetched for Ollama); e.g.
llama3.1 - Test Connection, Apply
TIP
If Ollama rejects the request, enable Use old /chat/completions endpoint in Settings → Advanced; some Ollama versions don't implement the Responses API (/responses).
Shared, central, or key-protected Ollama server
The default endpoint is localhost for a single machine. Ollama can also run on a shared or central server (it binds 0.0.0.0 and exposes an OpenAI-compatible /v1 API). If that's your case, select the Ollama preset and change the Endpoint URL to the server's address, e.g. http://ollama-server:11434/v1.
If your Ollama server requires an API key (e.g. OLLAMA_API_KEY is set), select the Custom preset instead, set the Endpoint URL to the Ollama server's address, and paste the key in the API Key field. OpenDocBot sends it as an Authorization: Bearer header, which Ollama validates.
OpenRouter
Setup:
- Preset: OpenRouter
- Create a key at https://openrouter.ai/keys
- Paste the key, Test Connection, Apply
- Pick a model.
Free models
The "Free models only" checkbox filters the model list to IDs ending in :free. Very handy for trying the add-in at zero cost.
OpenCode Zen
OpenCode Zen is the curated model gateway from OpenCode (the AI coding agent). It's a solid default for the self-hosted deployment and works out of the box with a single key.
Setup:
- Open the add-in Settings
- Preset: OpenCode Zen
- Get a key at https://opencode.ai/auth
- Paste the key, Test Connection, Apply
Browser CORS + self-hosted only
OpenCode Zen does not allow browser-origin requests. The preset is only available on self-hosted deployments, where the proxy functionality can be used. When using the hosted instance the OpenCode Zen preset is hidden. See Compatibility and Configuration.
Custom (any provider)
Custom lets you configure any of the three providers manually with your own endpoint and API key, instead of using a preset. The Provider dropdown selects the protocol: OpenAI Compatible (for any endpoint that speaks OpenAI's protocol: LiteLLM, Together, Groq, fireworks.ai, local proxies, corporate gateways, etc.), Anthropic Claude, or Google Gemini.
Setup:
- Preset: Custom
- Provider: OpenAI Compatible (or pick Anthropic Claude / Google Gemini to point Custom at those)
- Endpoint URL: your base URL, e.g.
https://api.together.xyz/v1 - API key: as required by the endpoint
- Model: pick from the list or type it manually
- Advanced → toggle Use old /chat/completions endpoint if your OpenAI-compatible endpoint only supports
/chat/completions - Test Connection, Apply
Custom is the escape hatch
If an OpenAI-compatible endpoint behaves oddly, first try toggling the legacy endpoint option. Most incompatibilities are protocol-level, not model-level.
Prompt caching
Prompt caching lets your provider reuse part of the conversation across turns instead of reprocessing it, which cuts cost and latency on long chats. Support depends on the provider:
- OpenAI, OpenRouter and OpenCode Zen cache automatically, so no settings are needed. Other OpenAI-compatible endpoints (Ollama, Custom) may or may not cache depending on the gateway, and the add-in doesn't control it.
- Anthropic caches the system prompt and conversation prefix server-side across turns. You can choose a Cache TTL (
5mor1h) in Settings. - Gemini keeps a context cache with an automatic rebuild threshold. The cache is deleted when the taskpane closes so idle-storage billing stops.
See Configuration for the exact settings.
Where keys are stored
Keys live in browser localStorage (opendocbot-settings). They are sent directly to the provider and are never stored on or transmitted to any third-party server by the add-in. Clearing browser storage removes them.