# Use your own language model key in VS Code

DevFeed: [Use your own language model key in VS Code](<https://devfeed.tech/articles/use-your-own-language-model-key-in-vs-code-4056.md>)

Original publisher: [Read original article](<https://code.visualstudio.com/blogs/2026/06/18/byok-vscode>)

Author: Kayla Cinnamon

Published: 2026-06-18T00:00:00Z

Content type: article

Language: en

Sources: [Visual Studio Code - Code Editing. Redefined.](<https://devfeed.tech/sources/visual-studio-code-code-editing-redefined.md>)

Topics: [AI Chat](<https://devfeed.tech/topics/ai-chat.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [anthropic](<https://devfeed.tech/tags/anthropic.md>), [api](<https://devfeed.tech/tags/api.md>), [api-keys](<https://devfeed.tech/tags/api-keys.md>), [azure](<https://devfeed.tech/tags/azure.md>), [blog](<https://devfeed.tech/tags/blog.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [extension](<https://devfeed.tech/tags/extension.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [github-copilot](<https://devfeed.tech/tags/github-copilot.md>), [model](<https://devfeed.tech/tags/model.md>), [models](<https://devfeed.tech/tags/models.md>), [offline](<https://devfeed.tech/tags/offline.md>), [openai](<https://devfeed.tech/tags/openai.md>), [vs-code](<https://devfeed.tech/tags/vs-code.md>)

## AI overview

The article explains how to use bring your own key (BYOK) or local language models in VS Code chat and agent workflows. It covers supported providers, offline local-model use, and limitations such as BYOK not applying to standard code completions.

## Source excerpt

Learn how to use bring your own key (BYOK) in VS Code to add models from providers like Azure, Anthropic, Gemini, OpenAI, Huggingface, OpenRouter, or use a local model with Ollama, Foundry Local, and more. Read the full article