Skip to content

Providers

OpenDocBot is provider-agnostic. Different providers are implementations of the same LLMProvider interface:

ProviderHandlesUnderlying protocol
OpenAICompatibleProviderOpenAI, Ollama, OpenRouter, OpenCode, CustomResponses API + /chat/completions
AnthropicProviderClaudeMessages API (/v1/messages)
GeminiProviderGoogle GeminigenerateContent / 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:

  1. Preset: OpenAI
  2. Create a key at https://platform.openai.com/api-keys
  3. 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:

  1. Preset: Anthropic Claude
  2. Create a key at https://console.anthropic.com/settings/keys
  3. Paste, Test Connection, Apply
  4. Optionally tune Prompt Caching in Advanced (TTL 5m vs 1h)

Google Gemini

Setup:

  1. Preset: Google Gemini
  2. Create a key at https://aistudio.google.com/apikey
  3. Paste, Test Connection, Apply
  4. 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:

  1. Preset: Ollama
  2. Adjust the endpoint in case it's needed. The default endpoint is http://localhost:11434/v1
  3. No key required; the field is hidden
  4. Type your model name (the model list isn't auto-fetched for Ollama); e.g. llama3.1
  5. 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:

  1. Preset: OpenRouter
  2. Create a key at https://openrouter.ai/keys
  3. Paste the key, Test Connection, Apply
  4. 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:

  1. Open the add-in Settings
  2. Preset: OpenCode Zen
  3. Get a key at https://opencode.ai/auth
  4. 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:

  1. Preset: Custom
  2. Provider: OpenAI Compatible (or pick Anthropic Claude / Google Gemini to point Custom at those)
  3. Endpoint URL: your base URL, e.g. https://api.together.xyz/v1
  4. API key: as required by the endpoint
  5. Model: pick from the list or type it manually
  6. Advanced → toggle Use old /chat/completions endpoint if your OpenAI-compatible endpoint only supports /chat/completions
  7. 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 (5m or 1h) 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.

OpenDocBot License · Copyright © 2026 OpenDocBot