LLM Providers

Configure cloud, local, and OpenAI-compatible model providers for Copilot.


Copilot includes 16 built-in AI providers, and you can add an unlimited number of additional models as long as they are OpenAI-compatible. You can use cloud-based services that require API keys, or run models locally on your own machine. This guide explains how to set up each provider.


How to Set API Keys

  1. Go to Settings → Copilot → Models (BYOK)
  2. Add a provider
  3. Enter the provider API key and select the models you want to configure
  4. Click Save
  5. Enable models for chat under Basic → Agents → Quick Chat models

You can configure multiple providers simultaneously and switch between them by changing the default model.

Copilot stores provider credentials in this device's Obsidian Keychain. Synced vault settings do not transfer credentials to another device, so enter the required keys separately on each device.


Cloud Providers

OpenRouter (Default)

OpenRouter is a gateway that provides access to hundreds of models from many providers through a single API key.

  • Get a key: https://openrouter.ai/keys
  • Default model: OpenRouter Gemini 2.5 Flash
  • Why use it: One key, many models. Good starting point.
  • Setting key: openRouterAiApiKey

OpenAI

Direct access to GPT-4.1, GPT-5, and other OpenAI models.

  • Get a key: https://platform.openai.com/api-keys
  • Models include: GPT-5.4, GPT-5 mini, GPT-5 nano, GPT-4.1, GPT-4.1 mini, GPT-4.1 nano, o4-mini (reasoning)
  • Setting key: openAIApiKey

Anthropic

Access to Claude models (Opus, Sonnet, etc.).

Google Gemini

Access to Google's Gemini family of models.

XAI / Grok

Access to Grok models from xAI.

Groq

Groq provides very fast inference for open-source models.

Mistral

Access to Mistral AI's models.

DeepSeek

Access to DeepSeek's chat and reasoning models.

Cohere

Access to Cohere's Command models.

SiliconFlow

A Chinese AI cloud platform with access to DeepSeek and Qwen models.

Azure OpenAI

Access to OpenAI models deployed on Microsoft Azure. Requires four fields to be configured:

SettingDescription
API KeyYour Azure OpenAI key
Instance NameYour Azure resource name
Deployment NameYour model deployment name
API Versione.g., 2024-02-01
  • Note: Unlike other providers, Azure OpenAI uses your own Azure deployment
  • Embedding: Can also use Azure for embeddings (separate deployment name required)

Amazon Bedrock

Access to models hosted on AWS Bedrock.

Important: Always use cross-region inference profile IDs, not bare model IDs. For example:

  • Use: us.anthropic.claude-sonnet-4-5-20250929-v1:0
  • Not: anthropic.claude-sonnet-4-5-20250929-v1:0

Cross-region profiles (with the us., eu., apac., or global. prefix) are more reliable and available across regions.

GitHub Copilot

Use your existing GitHub Copilot subscription to access AI models.

  • OAuth flow: Click Connect GitHub Copilot in the API key dialog
  • No separate API key needed — authenticates via GitHub OAuth
  • Requires: Active GitHub Copilot subscription

Local Model Providers

Local providers run models on your own computer. No API key or internet connection needed once set up.

Ollama

Runs open-source models locally on your machine.

  • Default port: 11434
  • URL: http://localhost:11434/v1/
  • Setup: Install Ollama (ollama.ai), pull a model, then add it in Copilot's Model settings
  • No API key required

LM Studio

A desktop app for running local models with a GUI.

  • Default port: 1234
  • URL: http://localhost:1234/v1
  • Setup: Install LM Studio, load a model, go to the Developer tab, enable CORS (required), click "Start Server", then add the model in Copilot
  • No API key required

3rd Party (OpenAI-Format)

For any API that follows the OpenAI API format. Useful for custom deployments, proxies, or other local inference servers (vLLM, LiteLLM, etc.).

  • Requires: Base URL and optionally an API key
  • Use when: Your provider isn't in the list but speaks OpenAI-format

CORS Warning: Some third-party providers (e.g., Perplexity) don't support CORS, which causes Copilot to fail with a CORS error. When adding a custom model for such a provider, enable the CORS toggle in the custom model form. Note: streaming is not available in CORS mode.


Provider-Specific Gotchas

ProviderCommon IssueFix
Azure OpenAIMissing one of four required fieldsCheck all four settings: key, instance name, deployment name, API version
Amazon BedrockRate limit or model not foundUse cross-region inference profile IDs with us., eu., apac., or global. prefix
GitHub CopilotToken expiredRe-authenticate via the OAuth button in API key dialog
OllamaConnection refusedMake sure Ollama is running (ollama serve) and the port is correct
Google GeminiQuota exceededUse a different model or check your quota at console.cloud.google.com
DeepSeekStreaming errorsTry disabling streaming in the per-session settings if you encounter issues