Docs · Guide

Obsidian on any model

Obsidian has no AI of its own; its community plugins bring it. magpie wires Copilot for Obsidian (logancyang/obsidian-copilot), which takes an OpenAI-compatible endpoint you name. magpie adds a provider called magpie in every vault that has Copilot, so Obsidian's AI chat runs on any model you have in magpie: DeepSeek, GLM, Kimi, Qwen, an OpenAI or Anthropic key, or a ChatGPT or Copilot subscription.

Set up Obsidian

  1. Install Copilot in ObsidianInstall and turn on Copilot from Obsidian's Settings › Community plugins. magpie shows the Obsidian row once a vault has Copilot.
  2. Add a provider in magpieAdd an API key on the Providers page, or sign in to a subscription.
  3. Pick magpie on Obsidian's rowOn the Agents page, pick magpie. Then reload Copilot in Obsidian, and magpie's models are in its model menu.
Terminal
magpie obsidian provider magpie

Vaults

Obsidian lists its vaults in obsidian.json in its config folder: ~/Library/Application Support/obsidian on a Mac, %APPDATA%\obsidian on Windows, $XDG_CONFIG_HOME/obsidian on Linux, or the Flatpak's and the Snap's own folders. Copilot keeps its settings in each vault's .obsidian/plugins/copilot/data.json. magpie wires every vault that has Copilot; after that it keeps the wired vaults up to date and wires none you haven't asked for.

The model list

This is what magpie writes into data.json. Only these keys change; everything else in the file stays as written:

Terminal
"providers": {"magpie": {
  "providerType": "openai-compatible", "displayName": "magpie",
  "baseUrl": "http://127.0.0.1:3425/agent/obsidian/v1",
  "requiresApiKey": false, …}},
"configuredModels": [{"providerId": "magpie", "info": {"id": "deepseek/deepseek-v4-pro", …}}, …],
"backends": {"chat": {"enabledModels": […]}},
"defaultModelKey": "…"

Each model carries its context size, output limit, images and thinking levels from magpie's catalog. A model new in magpie comes on in chat; a magpie model you turned off in Copilot stays off; one gone from magpie leaves every backend. Models and providers you added in Copilot yourself are untouched. The first time, Copilot's default model becomes magpie's first, and the one it had is kept to put back when you switch back.

No key to enter

Copilot keeps API keys in Obsidian's keychain, which magpie doesn't write. So magpie's provider needs no key (requiresApiKey: false): its requests carry no Authorization, and the gateway takes a call with no key from this computer. Copilot calls it with fetch from Obsidian's window, so replies stream, and the gateway answers that window's CORS. The /agent/obsidian in the address is how magpie knows it is Obsidian, since the window's User-Agent is a browser's.

Reloading Copilot

While Obsidian runs, Copilot holds its settings and writes data.json whole when it saves. So after wiring, reload Copilot in Settings › Community plugins (or restart Obsidian) before changing Copilot's settings, or the old settings write over magpie's. magpie says so while Obsidian is running.

Copilot 3

magpie writes only Copilot 4's format (providers and configuredModels). Copilot 3 kept models in activeModels; magpie leaves such a vault alone and names it in the error. Update Copilot to 4, which moves the settings itself when it first loads.

Switching back

Turn the row off in magpie. magpie takes its provider, its models and their places in every backend out of each vault's data.json, and puts back the default model you had while magpie's is still the default. A provider you added by hand under the name magpie, at an address that isn't magpie's Obsidian route, is yours and stays.

Terminal
magpie obsidian default

FAQ

Can Obsidian use DeepSeek, GLM, Kimi or Qwen?

Yes, through the Copilot for Obsidian plugin. magpie adds a magpie provider in every vault with Copilot, and every model you have in magpie is in Copilot's model menu.

Do I enter an API key in Copilot?

No. magpie's provider needs no key: requests go to the magpie gateway on this computer, which calls the model with your key or subscription.

Why doesn't Copilot show magpie's models?

Reload Copilot in Obsidian's Settings › Community plugins, or restart Obsidian. A vault on Copilot 3 needs Copilot 4 first.

Does Smart Connections work?

No. Its free plugin embeds with a local model only; its API providers are in the closed Pro plugin, with keys in the keychain magpie can't write.

More apps on the same models: Raycast, Cherry Studio and CodeBuddy on any model. Something fails? See Fixing common errors, or ask on Discord.