Skip to main content

正在更改 Copilot Chat 的 AI 模型

了解如何将 Copilot Chat 的默认 LLM 更改为不同的模型。

By default, Copilot Chat uses OpenAI's GPT-4o large language model. This is a highly proficient model that performs well for text generation tasks, such as summarization and knowledge-based chat. The model is also capable of reasoning, solving complex math problems and coding.

However, you are not limited to using this model. You can choose from a selection of other models, 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.

Copilot allows you to change the model during a chat and have the alternative model used to generate responses to your prompts.

Changing the model that's used by Copilot Chat does not affect the model that's used for Copilot code completion. See Changing the AI model for Copilot code completion.

Note

Multiple model support in Copilot Chat is in public preview and is subject to change.

AI models for Copilot Chat

The following models are currently available through multi-model Copilot Chat:

  • GPT-4o: This is the default Copilot Chat model. It is a versatile, multimodal model that excels in both text and image processing and is designed to provide fast, reliable responses. It also has superior performance in non-English languages. Learn more about the model's capabilities and review the model card. GPT-4o is hosted on Azure.
  • Claude Sonnet: This model excels at coding tasks across the entire software development lifecycle, from initial design to bug fixes, maintenance to optimizations. Learn more about the model's capabilities or read the model card. GitHub Copilot uses Claude Sonnet hosted on Amazon Web Services.
  • o1: This model is focused on advanced reasoning and solving complex problems, in particular in math and science. It responds more slowly than the GPT-4o model. You can make 10 requests to this model per day. Learn more about the model's capabilities and review the model card. o1 is hosted on Azure.
  • o1-mini: This is the faster version of the o1 model, balancing the use of complex reasoning with the need for faster responses. It is best suited for code generation and small context operations. You can make 50 requests to this model per day. Learn more about the model's capabilities and review the model card. o1-mini is hosted on Azure.

For more information about the o1 models, see Models in the OpenAI Platform documentation.

For more information about the Claude Sonnet model from Anthropic, see Using Claude Sonnet in Copilot Chat.

Changing the AI model for Copilot Chat

These instructions are for Visual Studio. For VS Code or for Copilot on the GitHub website, click the appropriate tab at the top of this page.

To use multi-model Copilot Chat, you must use Visual Studio 2022 version 17.12 or later. See the Visual Studio downloads page.

If you access Copilot Chat through a Copilot Business subscription, your organization must grant members the ability to switch to a different model. See Managing policies for Copilot in your organization.

Note

  • If you use Copilot Extensions, they may override the model you select.
  • Experimental pre-release versions of the models may not interact with all filters correctly, including the duplication detection filter.
  1. In the Visual Studio menu bar, click View, then click GitHub Copilot Chat.
  2. In the bottom right of the chat view, select the CURRENT-MODEL dropdown menu, then click the AI model of your choice.