|
| 1 | +--- |
| 2 | +title: 'Using AI models in Copilot Chat' |
| 3 | +description: Learn how to use built-in models or bring your own model (BYOM) in GitHub Copilot Chat for Visual Studio. |
| 4 | +ms.date: 8/19/2025 |
| 5 | +ms.update-cycle: 180-days |
| 6 | +ms.topic: get-started |
| 7 | +author: anandmeg |
| 8 | +ms.author: meghaanand |
| 9 | +ms.manager: mijacobs |
| 10 | +ms.subservice: ai-tools |
| 11 | +ms.collection: ce-skilling-ai-copilot |
| 12 | +monikerRange: '>= vs-2022' |
| 13 | +--- |
| 14 | +# Using AI models in Copilot Chat |
| 15 | + |
| 16 | +With Visual Studio 17.14, 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. |
| 17 | + |
| 18 | +However, you are not limited to using this model. You can also select from additional models or add your own, allowing you to choose the model that best fits your workflow requirements. |
| 19 | + |
| 20 | +## Available models |
| 21 | + |
| 22 | +Choose from an expanded set of models in the model picker: |
| 23 | + |
| 24 | +- Claude Sonnet 4 |
| 25 | +- Claude Opus 4 |
| 26 | +- GPT-5 |
| 27 | +- Claude Sonnet 3.5 |
| 28 | +- Claude 3.7 (thinking and non-thinking) |
| 29 | +- OpenAI o3-mini |
| 30 | +- Gemini 2.0 Flash |
| 31 | +- Gemini 2.5 Pro |
| 32 | + |
| 33 | +**Model selection improvements** |
| 34 | + |
| 35 | +- **Persistent selection**: The model you choose remains selected across chat threads. |
| 36 | +- **Enable models directly**: If a model is available in your plan but not yet enabled, you’ll see a prompt in the model picker to activate it. |
| 37 | + |
| 38 | +> 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. |
| 39 | +
|
| 40 | +## Bring your own model (BYOM) |
| 41 | + |
| 42 | +You can add your own language model to Copilot Chat by providing API keys from providers such as Anthropic, Google, or OpenAI. This allows you to select and configure custom AI models to match your workflow or to evaluate new model capabilities. |
| 43 | + |
| 44 | +### Benefits |
| 45 | + |
| 46 | +Using your own model enables you to: |
| 47 | + |
| 48 | +- Expand model selection beyond built-in options, including new or experimental models. |
| 49 | +- Meet infrastructure, security, or performance requirements with models that align to your needs. |
| 50 | +- Control and monitor API usage directly with your chosen provider. |
| 51 | +- Switch models easily between built-in and custom options. |
| 52 | + |
| 53 | +### Get started |
| 54 | + |
| 55 | +To add an API key: |
| 56 | + |
| 57 | +1. In the bottom right of the chat view, select the **model picker** dropdown. |
| 58 | +1. Select your provider (currently supported: **OpenAI**, **Anthropic**, and **Google**; additional providers may be added in future releases). |
| 59 | +1. Enter your **API key**. |
| 60 | +1. Select: |
| 61 | + - Any standard model listed, or |
| 62 | + - Any supported model offered by your provider, even if it doesn't appear in the default list. |
| 63 | +1. Once added, the custom model appears in the model picker. |
| 64 | +1. Start prompting in chat. Chat uses the custom model. |
| 65 | + |
| 66 | +### Limitations and considerations |
| 67 | + |
| 68 | +- Custom model support is limited to the Chat experience in Visual Studio and does not affect code completions or other AI-assisted features, such as commit message generation. |
| 69 | +- Model capabilities depend on the provider; some models may not support features such as tool use, vision inputs, or advanced reasoning. |
| 70 | +- Services like embeddings, intent detection, and repository indexing may continue to use the Copilot API. |
| 71 | +- When using a custom model, output is returned directly from the provider and may bypass Copilot’s responsible AI filtering. |
| 72 | +- Custom model support is **not** available for Copilot Business or Enterprise users. |
| 73 | + |
| 74 | +## Related content |
| 75 | + |
| 76 | +- [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) |
| 77 | +- [About premium requests](https://docs.github.com/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests#premium-requests) |
| 78 | +- [About Copilot billing](https://docs.github.com/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/billing-and-payments/about-billing-for-individual-copilot-plans) |
| 79 | +- [GitHub support](https://support.github.com/) |
| 80 | +- [Manage Copilot usage and models](copilot-usage-and-models.md) |
0 commit comments