Skip to main content

LLM Providers

💡TL;DR

Notemd supports 36 LLM providers across 4 transport types. All API calls use raw HTTP (no SDKs) with automatic retry, transport fallback, and 5-minute response caching. Per-task model selection lets you use cheap models for concept extraction and powerful models for research. No API key needed for local providers (Ollama, LMStudio).

This is part of the Obsidian AI Knowledge Management Guide.

Provider Categories

Cloud Providers

ProviderDefault Base URLDefault ModelTemperature
DeepSeekapi.deepseek.comdeepseek-v4-pro0.5
OpenAIapi.openai.com/v1gpt-4o0.5
Anthropicapi.anthropic.comclaude-3-5-sonnet-202406200.5
Googlegenerativelanguage.googleapis.com/v1gemini-2.0-flash-exp0.5
Mistralapi.mistral.ai/v1mistral-large-latest0.5
xAIapi.x.ai/v1grok-40.7
Cerebrasapi.cerebras.ai/v1gpt-oss-120b0.5
Fireworksapi.fireworks.ai/inference/v1kimi-k2p50.5
Nebiusapi.studio.nebius.com/v1openai/gpt-oss-120b0.3

Gateway / Proxy Providers

ProviderDefault Base URLDefault ModelNotes
OpenRouteropenrouter.ai/api/v1anthropic/claude-3.7-sonnetAdds HTTP-Referer + X-Title headers
GitHub Modelsmodels.github.ai/inferencegpt-4o-miniAdds X-GitHub-Api-Version header
AIHubMixaihubmix.com/v1gpt-4o-miniAdds APP-Code header
PPIOapi.ppinfra.com/v3/openaiqwen/qwen3-32b
Hugging Facerouter.huggingface.co/v1openai/gpt-oss-120b
Vercel AI Gatewayai-gateway.vercel.sh/v1anthropic/claude-sonnet-4.5
Requestyrouter.requesty.ai/v1anthropic/claude-3-7-sonnet-latest
Togetherapi.together.xyz/v1meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
LiteLLMlocalhost:4000/v1your-proxy-modelOptional API key
New APIlocalhost:3000/v1gpt-4.1Optional API key
OpenAI Compatible(user-configured)your-model-idCustom endpoint

China Providers

ProviderDefault Base URLDefault ModelNotes
Qwendashscope.aliyuncs.com/compatible-mode/v1qwen3-235b-a22bAlibaba DashScope
Qwen Codedashscope.aliyuncs.com/compatible-mode/v1qwen3-coder-plusCoding-focused
Doubaoark.cn-beijing.volces.com/api/v3(endpoint ID required)ByteDance Volcengine
Moonshotapi.moonshot.cn/v1kimi-k2-0905-previewKimi
Xiaomi MiMoapi.xiaomimimo.com/v1mimo-v2.5-pro
GLMopen.bigmodel.cn/api/paas/v4glm-5Zhipu, China endpoint
Z AIapi.z.ai/api/paas/v4glm-5Zhipu, international endpoint
MiniMaxapi.minimaxi.com/v1MiniMax-M2.7
Baidu Qianfanqianfan.baidubce.com/v2ernie-4.5-turbo-32k
SiliconFlowapi.siliconflow.cn/v1Qwen/QwQ-32BModel hosting platform
Huawei Cloud MaaSapi.modelarts-maas.com/v1DeepSeek-V3

Doubao requires an Ark endpoint ID (format: ep-xxxxxxxx-xxxx-xxxx). The default placeholder must be replaced.

Local Providers

ProviderDefault Base URLDefault ModelNotes
Ollamalocalhost:11434/apillama3No API key. NDJSON streaming. Model discovery via /api/tags
LMStudiolocalhost:1234/v1local-modelSends "EMPTY" as bearer token. OpenAI-compatible discovery
OVMSlocalhost:8000/v3openvino-modelOpenVINO Model Server
Azure OpenAI(user-configured)gpt-4oDeployment name in URL. api-key header

Per-Task Model Selection

Notemd supports independent provider and model for each task. Enable with useMultiModelSettings: true.

Available Tasks

TaskSettings KeyDefault Provider
Add Links (wiki-link insertion)addLinksProvider / addLinksModelDeepSeek
Research (web search + summarize)researchProvider / researchModelDeepSeek
Generate from TitlegenerateTitleProvider / generateTitleModelDeepSeek
TranslationtranslateProvider / translateModelDeepSeek
Diagram GenerationsummarizeToMermaidProvider / ModelDeepSeek
Concept ExtractionextractConceptsProvider / ModelDeepSeek
Original Text ExtractionextractOriginalTextProvider / ModelDeepSeek

Resolution Order

  1. If useMultiModelSettings is on → use the task-specific provider + model
  2. If task model override is empty → fall back to the provider's default model
  3. If task provider is invalid → fall back to the global activeProvider
  4. If useMultiModelSettings is off → all tasks use the global activeProvider
# Researcher: power for research, cheap for everything else
activeProvider: DeepSeek
extractConceptsProvider: DeepSeek
researchProvider: OpenAI # GPT-4o for better research quality
summarizeToMermaidProvider: DeepSeek

# Privacy-first: local only
activeProvider: Ollama
addLinksProvider: Ollama
extractConceptsProvider: Ollama

# Budget bilingual
activeProvider: DeepSeek
translateProvider: Google # Gemini Flash for translation
researchProvider: SiliconFlow # Cheaper China-based routing

API Call Architecture

Transport Layers

  1. Obsidian requestUrl — primary (built-in, works on all platforms)
  2. Desktop HTTP — Node.js http/https modules (streaming + long requests)
  3. Web fetch — fallback when Node.js modules unavailable

The plugin automatically cascades between transports on transient network errors.

Retry Logic

  • Normal mode (enableStableApiCall: false): Single attempt. On transient failure, auto-escalates to stable retry.
  • Stable retry mode (enableStableApiCall: true): Up to 4 attempts (1 + 3 retries) with 5s intervals.
  • Transient errors that trigger retry: err_connection_closed, err_connection_reset, err_timed_out, econnreset, econnaborted, etimedout, socket hang up, network request failed
  • Non-retryable: HTTP 400, 401, 403, 404

Response Caching

5-minute in-memory LRU cache keyed by provider + model + temperature + prompt + content. Subsequent identical requests within 5 minutes return cached results instantly.

Reasoning Model Handling

Models that don't support the system role (DeepSeek R1, OpenAI o1/o3/o4/gpt-5) automatically have system + user prompts combined into a single user message.

DeepSeek-specific: thinkingEnabled adds { thinking: { type: 'enabled' } } to the request. reasoningEffort (low/medium/high) is passed as reasoning_effort. Validates that max output tokens ≥ 8000 when thinking is on.

Token Estimation

estimateTokens(text): Math.ceil(text.length / 4) — 4-chars-per-token heuristic. Used to enforce maxResearchContentTokens before sending to LLM.

No cost tracking is implemented.

Model Discovery

ModeProvidersEndpoint
ollama-tagsOllama/api/tags
google-modelsGoogleModels list API
anthropic-modelsAnthropicModels list API
openai-compatible-modelsDeepSeek, Qwen, Mistral, etc./v1/models
openrouter-modelsOpenRouterModel list API
github-modelsGitHub ModelsInference API
noneAzure OpenAIDisabled (requires deployment name)

Quick Start

  1. Pick a provider — DeepSeek (China), OpenAI (International), or Ollama (Local/Free)
  2. Enter API key — Settings → Notemd → Provider → API Key
  3. Test connection — Click the test button
  4. Optional: Per-task models — Enable useMultiModelSettings and configure individually

For Ollama: no API key needed. Just make sure ollama serve is running.


Next Steps