You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copilot in Visual Studio Code offers different built-in language models that are optimized for different tasks. You can also bring your own language model API key to use models from other providers. This article describes how to change the language model for chat or code completions, and how to use your own API key.
9
+
Visual Studio Code offers different language models that are optimized for different tasks via GitHub Copilot. You can also bring your own language model API key to use models from other providers. This article describes how to change the language model for chat or code completions, and how to use your own API key.
10
10
11
11
## Choose the right model for your task
12
12
13
13
By default, chat uses a base model to provide fast, capable responses for a wide range of tasks, such as coding, summarization, knowledge-based questions, reasoning, and more.
14
14
15
-
However, you are not limited to using only this model. You can choose from a [selection of language models](https://docs.github.com/en/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat#ai-models-for-copilot-chat-1), each with its own particular strengths. You may have a favorite model that you like to use, or you might prefer to use a particular model for inquiring about a specific subject. For a detailed comparison of AI models, see [Choosing the right AI model for your task](https://docs.github.com/en/copilot/using-github-copilot/ai-models/choosing-the-right-ai-model-for-your-task) in the GitHub Copilot documentation.
15
+
However, you are not limited to using only this model. You can choose from a [selection of language models](https://docs.github.com/en/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat#ai-models-for-copilot-chat-1), each with its own particular strengths. For a detailed comparison of AI models, see [Choosing the right AI model for your task](https://docs.github.com/en/copilot/using-github-copilot/ai-models/choosing-the-right-ai-model-for-your-task) in the GitHub Copilot documentation.
16
16
17
-
Depending on the [chat mode](/docs/copilot/chat/copilot-chat.md#chat-mode) you are using, the list of available models might be different. For example, in agent mode, the list of models is limited to those that have good support for tool calling.
17
+
Depending on the [chat mode](/docs/copilot/chat/chat-modes.md) you are using, the list of available models might be different. For example, in agent mode, the list of models is limited to those that have good support for tool calling.
18
18
19
19
> [!NOTE]
20
20
> If you are a Copilot Business or Enterprise user, your administrator needs to enable certain models for your organization by opting in to `Editor Preview Features` in the [Copilot policy settings](https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization) on GitHub.com.
21
21
22
-
## Why use your own language model API key?
23
-
24
-
In addition to the built-in models, you can access models directly from Anthropic, Azure, Google, Groq, OpenAI, OpenRouter, or Ollama by providing a valid API key. Learn how to [use your own API in VS Code](#bring-your-own-language-model-key).
25
-
26
-
Using your own language model API key in VS Code has several advantages:
27
-
28
-
-**Model choice**: access hundreds of models from different providers, beyond the built-in models.
29
-
-**Experimentation**: experiment with new models or features that are not yet available in the built-in models.
30
-
-**Local compute**: use your own compute for one of the models already supported in GitHub Copilot or to run models not yet available.
31
-
-**Greater control**: by using your own key, you can bypass the standard rate limits and restrictions imposed on the built-in models.
32
-
33
-
> [!IMPORTANT]
34
-
> This feature is in preview and is not currently available to Copilot Business or Copilot Enterprise users.
35
-
36
22
## Change the model for chat conversations
37
23
38
24
Use the language model picker in the chat input field to change the model that is used for chat conversations and code editing.
@@ -67,11 +53,18 @@ To change the language model that is used for generating code completions in the
67
53
68
54
## Bring your own language model key
69
55
70
-
If you already have an API key for a language model provider, you can use their models in chat in VS Code, in addition to the built-in models that Copilot provides. You can use models from the following providers: Anthropic, Azure, Google Gemini, Groq, Ollama, OpenAI, and OpenRouter.
71
-
72
56
> [!IMPORTANT]
73
57
> This feature is in preview and is not currently available to Copilot Business or Copilot Enterprise users.
74
58
59
+
If you already have an API key for a language model provider, you can use their models in chat in VS Code, in addition to the built-in models that Copilot provides. You can use models from the following providers: Anthropic, Azure, Google Gemini, Groq, Ollama, OpenAI, OpenRouter, and xAI.
60
+
61
+
Using your own language model API key in VS Code has several advantages:
62
+
63
+
-**Model choice**: access hundreds of models from different providers, beyond the built-in models.
64
+
-**Experimentation**: experiment with new models or features that are not yet available in the built-in models.
65
+
-**Local compute**: use your own compute for one of the models already supported in GitHub Copilot or to run models not yet available.
66
+
-**Greater control**: by using your own key, you can bypass the standard rate limits and restrictions imposed on the built-in models.
67
+
75
68
To manage the available models for chat:
76
69
77
70
1. Select **Manage Models** from the language model picker in the Chat view.
@@ -108,7 +101,7 @@ To update the provider details, such as the API key or endpoint URL:
108
101
109
102
1. Update the provider details, such as the API key or endpoint URL.
110
103
111
-
###Considerations
104
+
## Considerations
112
105
113
106
There are a number of considerations when using your own language model API key in VS Code:
0 commit comments