Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

AI Providers

pfrankovpfrankov63k downloads

A hub for setting AI providers (OpenAI-like, Ollama and more) in one place.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates27

AI Providers manages shared AI provider settings and gives other Obsidian plugins a common API for generation, tool calling, embeddings, and vector retrieval.

Think of it like a control panel where you can:

  • Store your API keys and settings for AI services
  • Share these settings with other Obsidian plugins
  • Avoid entering the same AI settings multiple times

When another plugin calls the SDK, AI Providers sends generation, tool-calling, and embedding requests to the configured local or remote provider. It also caches embeddings and ranks document chunks locally for vector-based retrieval.

image

Required by plugins

  • Local GPT

Supported providers

  • OpenAI
  • OpenRouter
  • OpenCode Go (Chat Completions models)
  • Anthropic
  • Google Gemini
  • Mistral AI
  • Together AI
  • Fireworks AI
  • Perplexity AI
  • DeepSeek
  • xAI (Grok)
  • Cerebras
  • Z.AI
  • Groq
  • 302.AI
  • Novita AI
  • DeepInfra
  • SambaNova
  • LM Studio
  • Ollama (and Open WebUI)
  • OpenAI compatible API

Features

  • Fully encapsulated API for working with AI providers
  • Develop AI plugins faster without dealing directly with provider-specific APIs
  • Easily extend support for additional AI providers in your plugin
  • Available in 11 languages: English, Spanish, French, Italian, Portuguese, German, Russian, Chinese, Japanese, Korean, and Dutch

Installation

Obsidian plugin store (recommended)

This plugin is available in the Obsidian community plugin store https://obsidian.md/plugins?id=ai-providers

BRAT

You can install this plugin via BRAT: pfrankov/obsidian-ai-providers

Create AI provider

Models and capabilities

Refreshing models selects the first returned model. An empty list or a failed refresh keeps the current model selection. Capability checkbox edits and accepted Check results save immediately for existing providers; new providers keep them locally until Save.

Changing the provider type, URL, or API key, or closing the form, discards pending refresh/check results. Changing the selected model or editing its capability checkboxes also discards a pending check. Requests already sent to the provider continue running and may still incur charges.

Optional reasoning modes

The model capabilities section includes manual reasoning-mode checkboxes for supported adapters. Select only modes documented for your model and endpoint. These are declarations, not automatic detection: Check probes text, embeddings, tools, and vision, and preserves the manual reasoning set. Checking a mode does not change other plugins' requests or set a shared default. A consuming plugin must explicitly select a declared mode for each request.

The checkboxes offer each adapter's wire vocabulary; they do not establish model support. Nothing is selected automatically. Model names are only keys for saved capabilities: changing or adding a model name never needs a code change.

Provider transport Request field Manually selectable vocabulary
OpenAI Chat Completions reasoning_effort none, minimal, low, medium, high, xhigh, max
Z.AI reasoning_effort low, high, max
OpenRouter reasoning.effort none, minimal, low, medium, high, xhigh, max
Ollama / Open WebUI top-level think true, false, low, medium, high

The saved per-model declarations are the source of truth for request selection. Select only values supported by your endpoint. The service rejects undeclared values and values outside the adapter vocabulary; remote support is not probed. It does not infer modes, sampling compatibility, tool support or API routing from model names. Native Anthropic reasoning is not implemented.

Omission preserves the API default; it does not mean thinking is disabled. none, max and xhigh are passed literally. No intensity mapping, token budget, sampling rewrite or reasoning-specific fallback/retry is added. Sampling and tools remain as supplied by the consumer. An endpoint may reject their combination with reasoning; that error is surfaced. Consumers must explicitly omit incompatible sampling options themselves. This feature adds no sampling-default control.

Contracts: OpenAI reasoning, OpenAI model compatibility, Z.AI, OpenRouter and its per-model metadata, Ollama.

Ollama

  1. Install Ollama.
  2. Install Gemma 2 ollama pull gemma2 or any preferred model from the library.
  3. Select Ollama in Provider type
  4. Click refresh button and select the model that suits your needs (e.g. gemma2)

Additional: if you have issues with streaming completion with Ollama try to set environment variable OLLAMA_ORIGINS to *:

  • For MacOS run launchctl setenv OLLAMA_ORIGINS "*".
  • For Linux and Windows check the docs.

OpenAI

  1. Select OpenAI in Provider type
  2. Set Provider URL to https://api.openai.com/v1
  3. Retrieve and paste your API key from the API keys page
  4. Click refresh button and select the model that suits your needs (e.g. gpt-4o)

OpenAI compatible server

There are several options to run local OpenAI-like server:

  • Open WebUI
  • llama.cpp
  • llama-cpp-python
  • LocalAI
  • Obabooga Text generation web UI
  • LM Studio
  • ...maybe more

OpenRouter

  1. Select OpenRouter in Provider type
  2. Set Provider URL to https://openrouter.ai/api/v1
  3. Retrieve and paste your API key from the API keys page
  4. Click refresh button and select the model that suits your needs (e.g. anthropic/claude-3.7-sonnet)

OpenCode Go

  1. Select OpenCode Go in Provider type. The default URL is https://opencode.ai/zen/go/v1.
  2. Enter your OpenCode Go API key.
  3. Enter a model ID whose documented endpoint ends in /chat/completions (for example, glm-5.2).

This adapter supports Chat Completions only. Responses and Messages models and embeddings are not supported. Model entry is manual because Go's /models list mixes protocols without identifying the API type. No model is selected automatically; check the current endpoint table before entering an ID. Unsupported model errors from the service are surfaced without switching protocols.

OpenCode Go is intended for coding-agent traffic. Adding the provider does not make a consuming plugin a coding agent or establish that other uses are permitted. Requests identify this plugin as obsidian-ai-providers/<version> and include an opaque session UUID. SDK consumers should reuse conversationId for related calls; without one, each call gets a fresh UUID that remains stable during SDK retries and transport fallback. Go always uses the existing Electron/Obsidian HTTP transport, ignoring the developer Use native fetch setting, because Chromium fetch drops the required User-Agent.

Google Gemini

  1. Select Google Gemini in Provider type
  2. Set Provider URL to https://generativelanguage.googleapis.com/v1beta/openai
  3. Retrieve and paste your API key from the API keys page
  4. Click refresh button and select the model that suits your needs (e.g. gemini-1.5-flash)

LM Studio

  1. Select LM Studio in Provider type
  2. Set Provider URL to http://localhost:1234/v1
  3. Click refresh button and select the model that suits your needs (e.g. gemma2)

Groq

  1. Select Groq in Provider type
  2. Set Provider URL to https://api.groq.com/openai/v1
  3. Retrieve and paste your API key from the API keys page
  4. Click refresh button and select the model that suits your needs (e.g. llama3-70b-8192)

For plugin developers

Docs: How to integrate AI Providers in your plugin.

Provider migration returns false if its confirmation dialog is canceled or dismissed (including Escape or clicking outside), without adding or saving a provider. Confirmed migrations resolve with the provider after settings are saved.

Requests using Obsidian's HTTP transport preserve provider error status, headers, and body for the provider SDK's error handling and retries, including Retry-After.

Embedding cache

Cached embeddings are isolated by provider ID, type, full URL, and model. Renaming a provider or rotating its API key preserves cache hits. Changing the model behind an unchanged endpoint/model name, or account-specific routing, cannot be detected by this identity.

Older cache records do not identify their endpoint, so they are retained but ignored. The first subsequent use of each previously cached text recomputes its embedding and sends that text to the current provider again. This one-time lazy rebuild can take time and incur provider charges; no background rebuild or startup provider request is performed. Concurrent writes preserve each call's new entries, but simultaneous misses can still send the same text more than once.

Development checks

Use Node.js 24 and install the committed dependencies with npm ci. Run npm run format:check, npm run check, npm run build, npm run sdk:build, and npm run example:build before submitting a change. The check command runs lint, tests with 100% coverage thresholds, and type checks. These checks and builds also run on pull requests.

Quick reference (details in SDK docs):

try {
    const finalText = await aiProviders.execute({
        provider,
        prompt: "Hello",
        onProgress: (chunk, full) => {/* stream UI update */},
        abortController
    });
    // use finalText
} catch (e) {
    // handle error / abort
}

Tool-calling loops are available via toolsExecute() (SDK 1.7.0 / Service API v4). It is message-only and uses top-level tools / tool_choice, returning an OpenAI-style assistant message (role, content, tool_calls) that you can append directly to messages history.

Ollama tool calls are returned in arrival order across streamed chunks, including repeated calls, with sequential IDs (call_1, call_2, ...).

Removed callbacks: onEnd / onError — promise resolve/reject covers them (only onProgress remains for streaming). Legacy chainable handler also deprecated.

Roadmap

  • Docs for devs
  • Ollama context optimizations
  • German translations
  • Chinese translations
  • Update to latest OpenAI version and embedding models
  • Russian translations
  • Groq Provider support
  • Passing messages instead of one prompt
  • Anthropic Provider support
  • Shared embeddings to avoid re-embedding the same documents multiple times
  • Spanish, Italian, French, Dutch, Portuguese, Japanese, Korean translations
  • Encapsulated vector-based retrieval for RAG

My other Obsidian plugins

  • Local GPT that assists with local AI for maximum privacy and offline access.
  • Colored Tags that colorizes tags in distinguishable colors.
HealthExcellent
ReviewCaution
About
Manage AI provider settings and API keys from a single control panel. Store and share credentials and configuration for multiple AI services so other Obsidian plugins can connect without re-entering details. Do not perform AI processing; serve as a centralized, extendable provider hub compatible with OpenAI-style APIs.
AIIntegrationsDevelopers
Details
Current version
1.13.0
Last updated
4 days ago
Created
2 years ago
Updates
27 releases
Downloads
63k
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
pfrankovpfrankov
github.com/pfrankov
GitHubpfrankov
  1. Community
  2. Plugins
  3. AI
  4. AI Providers

Related plugins

BRAT

Easily install a beta version of a plugin for testing.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

Agent Client

Chat with Claude Code, Codex, Gemini CLI, and more via the Agent Client Protocol — right from your vault.

Terminal

Integrate consoles, shells, and terminals.

Snipd Official

Sync Snipd podcast highlights to your vault with transcript, notes, AI summaries and metadata.

Claude Sidebar

Run Claude Code in your sidebar.

Backlink Cache

Store backlink cache to speed up `app.metadataCache.getBacklinksForFile`.

Sync Engine

The extensible vault synchronization engine: Fast · Free · Reliable. Supports WebDAV, S3, and Google Drive.