LLM Providers
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
| Provider | Default Base URL | Default Model | Temperature |
|---|---|---|---|
| DeepSeek | api.deepseek.com | deepseek-v4-pro | 0.5 |
| OpenAI | api.openai.com/v1 | gpt-4o | 0.5 |
| Anthropic | api.anthropic.com | claude-3-5-sonnet-20240620 | 0.5 |
generativelanguage.googleapis.com/v1 | gemini-2.0-flash-exp | 0.5 | |
| Mistral | api.mistral.ai/v1 | mistral-large-latest | 0.5 |
| xAI | api.x.ai/v1 | grok-4 | 0.7 |
| Cerebras | api.cerebras.ai/v1 | gpt-oss-120b | 0.5 |
| Fireworks | api.fireworks.ai/inference/v1 | kimi-k2p5 | 0.5 |
| Nebius | api.studio.nebius.com/v1 | openai/gpt-oss-120b | 0.3 |
Gateway / Proxy Providers
| Provider | Default Base URL | Default Model | Notes |
|---|---|---|---|
| OpenRouter | openrouter.ai/api/v1 | anthropic/claude-3.7-sonnet | Adds HTTP-Referer + X-Title headers |
| GitHub Models | models.github.ai/inference | gpt-4o-mini | Adds X-GitHub-Api-Version header |
| AIHubMix | aihubmix.com/v1 | gpt-4o-mini | Adds APP-Code header |
| PPIO | api.ppinfra.com/v3/openai | qwen/qwen3-32b | |
| Hugging Face | router.huggingface.co/v1 | openai/gpt-oss-120b | |
| Vercel AI Gateway | ai-gateway.vercel.sh/v1 | anthropic/claude-sonnet-4.5 | |
| Requesty | router.requesty.ai/v1 | anthropic/claude-3-7-sonnet-latest | |
| Together | api.together.xyz/v1 | meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo | |
| LiteLLM | localhost:4000/v1 | your-proxy-model | Optional API key |
| New API | localhost:3000/v1 | gpt-4.1 | Optional API key |
| OpenAI Compatible | (user-configured) | your-model-id | Custom endpoint |
China Providers
| Provider | Default Base URL | Default Model | Notes |
|---|---|---|---|
| Qwen | dashscope.aliyuncs.com/compatible-mode/v1 | qwen3-235b-a22b | Alibaba DashScope |
| Qwen Code | dashscope.aliyuncs.com/compatible-mode/v1 | qwen3-coder-plus | Coding-focused |
| Doubao | ark.cn-beijing.volces.com/api/v3 | (endpoint ID required) | ByteDance Volcengine |
| Moonshot | api.moonshot.cn/v1 | kimi-k2-0905-preview | Kimi |
| Xiaomi MiMo | api.xiaomimimo.com/v1 | mimo-v2.5-pro | |
| GLM | open.bigmodel.cn/api/paas/v4 | glm-5 | Zhipu, China endpoint |
| Z AI | api.z.ai/api/paas/v4 | glm-5 | Zhipu, international endpoint |
| MiniMax | api.minimaxi.com/v1 | MiniMax-M2.7 | |
| Baidu Qianfan | qianfan.baidubce.com/v2 | ernie-4.5-turbo-32k | |
| SiliconFlow | api.siliconflow.cn/v1 | Qwen/QwQ-32B | Model hosting platform |
| Huawei Cloud MaaS | api.modelarts-maas.com/v1 | DeepSeek-V3 |
Doubao requires an Ark endpoint ID (format: ep-xxxxxxxx-xxxx-xxxx). The default placeholder must be replaced.
Local Providers
| Provider | Default Base URL | Default Model | Notes |
|---|---|---|---|
| Ollama | localhost:11434/api | llama3 | No API key. NDJSON streaming. Model discovery via /api/tags |
| LMStudio | localhost:1234/v1 | local-model | Sends "EMPTY" as bearer token. OpenAI-compatible discovery |
| OVMS | localhost:8000/v3 | openvino-model | OpenVINO Model Server |
| Azure OpenAI | (user-configured) | gpt-4o | Deployment 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
| Task | Settings Key | Default Provider |
|---|---|---|
| Add Links (wiki-link insertion) | addLinksProvider / addLinksModel | DeepSeek |
| Research (web search + summarize) | researchProvider / researchModel | DeepSeek |
| Generate from Title | generateTitleProvider / generateTitleModel | DeepSeek |
| Translation | translateProvider / translateModel | DeepSeek |
| Diagram Generation | summarizeToMermaidProvider / Model | DeepSeek |
| Concept Extraction | extractConceptsProvider / Model | DeepSeek |
| Original Text Extraction | extractOriginalTextProvider / Model | DeepSeek |
Resolution Order
- If
useMultiModelSettingsis on → use the task-specific provider + model - If task model override is empty → fall back to the provider's default model
- If task provider is invalid → fall back to the global
activeProvider - If
useMultiModelSettingsis off → all tasks use the globalactiveProvider
Recommended Configurations
# 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
- Obsidian
requestUrl— primary (built-in, works on all platforms) - Desktop HTTP — Node.js
http/httpsmodules (streaming + long requests) - 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
| Mode | Providers | Endpoint |
|---|---|---|
ollama-tags | Ollama | /api/tags |
google-models | Models list API | |
anthropic-models | Anthropic | Models list API |
openai-compatible-models | DeepSeek, Qwen, Mistral, etc. | /v1/models |
openrouter-models | OpenRouter | Model list API |
github-models | GitHub Models | Inference API |
none | Azure OpenAI | Disabled (requires deployment name) |
Quick Start
- Pick a provider — DeepSeek (China), OpenAI (International), or Ollama (Local/Free)
- Enter API key — Settings → Notemd → Provider → API Key
- Test connection — Click the test button
- Optional: Per-task models — Enable
useMultiModelSettingsand configure individually
For Ollama: no API key needed. Just make sure ollama serve is running.
Next Steps
- 📝 Concept Notes — Uses per-task extraction model
- 🎨 Diagrams — Uses per-task diagram model
- 🔍 Research — Uses research-specific model
- ⚙️ Configuration — Full settings reference