Edit

Share via


Get started with AI models in Copilot Chat

With Visual Studio 17.14, GitHub Copilot in Visual Studio uses GPT-4.1 as the default model (previously GPT-4o). GPT-4.1 provides faster response times, higher-quality suggestions, and improved efficiency for coding tasks.

However, you're not limited to using this model. You can also select a different model or add your own. You choose the model that best fits your workflow requirements.

Available models

Choose from an expanded set of models in the model picker:

  • Claude Sonnet 4
  • Claude Opus 4
  • GPT-5
  • Claude Sonnet 3.5
  • Claude 3.7 (thinking and non-thinking)
  • OpenAI o3-mini
  • Gemini 2.0 Flash
  • Gemini 2.5 Pro

Improvements to model selection include:

  • Persistent selection: The model that you choose remains selected across chat threads.
  • Ability to enable models directly: If a model is available in your plan but not yet enabled, you see a prompt in the model picker to activate it.

Model availability depends on your Copilot subscription and the current status of each model. For Copilot Enterprise and Business, administrators must enable the Preview policy in Copilot settings before models are available in Visual Studio.

Bring your own model (BYOM)

You can add your own language model to Copilot Chat by providing API keys from providers such as Anthropic, Google, or OpenAI. This ability allows you to select and configure custom AI models to match your workflow or to evaluate new model capabilities.

Benefits

Using your own model enables you to:

  • Expand model selection beyond built-in options, including new or experimental models.
  • Meet infrastructure, security, or performance requirements with models that align to your needs.
  • Control and monitor API usage directly with your chosen provider.
  • Switch models easily between built-in and custom options.

Steps for adding an API key

  1. In the chat view, go to the Model picker dropdown list.

  2. Select your provider. These providers are currently supported: OpenAI, Anthropic, and Google.

  3. Enter your API key value.

  4. Select one of these items:

    • Any standard model listed
    • Any supported model that your provider offers, even if it doesn't appear in the default list
  5. Confirm that the custom model appears in the model picker.

  6. Start prompting in a chat. Copilot Chat uses the custom model.

Limitations and considerations

  • Support for custom models is limited to the Copilot Chat experience in Visual Studio. It doesn't affect code completions or other AI-assisted features, such as the generation of commit messages.
  • Model capabilities depend on the provider. Some models might not support features such as tool use, vision inputs, or advanced reasoning.
  • Services like embeddings, intent detection, and repository indexing might continue to use the Copilot API.
  • When you use a custom model, output is returned directly from the provider and might bypass the filtering for responsible AI in Copilot.
  • Support for custom models is not available for Copilot Business or Enterprise users.