Selecting and switching models
1. Selecting and switching models
GitHub Copilot supports a growing2. Copilot supports several language models
set of AI models from providers like OpenAI, Anthropic, and Google.3. Choosing the right model for the task
Choosing the right model for the task at hand can help you get faster, smarter, and more relevant results.4. Choosing the right model for the task
Some models respond quickly and are great for autocomplete.5. Choosing the right model for the task
Others are optimized for reasoning, and better suited for refactoring, debugging, or planning.6. Not all models are created equal
That being said, not all models support every feature.7. Not all models are created equal
For example, some models don't support Agent Mode. Always check the latest Copilot documentation to see which models are compatible with the features you need.8. The default model
For most tasks, you can start with the default model, which currently is GPT-4.1.9. The default model
It's fast,10. The default model
reliable,11. The default model
and works across all Copilot modes—including Agent Mode.12. Complex tasks: reasoning models
If you're doing something more complex, like refactoring across multiple files, working with tools, or debugging backend logic, you might prefer a reasoning model, such as: Claude Sonnet 4, GPT-5, or Claude Opus 4.1.13. Reasoning models characteristics
These models process prompts in multiple steps and may take longer to respond,14. Reasoning models characteristics
but can give you a better structure,15. Reasoning models characteristics
accuracy,16. Reasoning models characteristics
and adaptability,17. Reasoning models characteristics
especially when paired with Agent Mode.18. Choosing the right model for the interface
Many developers use one model for chat, where depth matters,19. Choosing the right model for the interface
and another for autocomplete, where speed is important.20. Switching models in VS Code
To change the model Copilot uses in the Chat view: Open the Chat panel, click the model picker in the input bar, and choose from the available options. If you're on a paid Copilot plan, you'll see usage multipliers next to certain models. These help you understand how much each model counts toward your monthly premium request quota. You can customize your model list. To do this: Open the model picker, select Manage Models, choose which models you want to show, and optionally, deselect any you're not using regularly. This makes switching models quicker and more tailored to your preferences.21. Bring your own API key
Copilot also supports using your own model by connecting an API key. This lets you: Test newer models not yet available in Copilot's built-in list, use local or private deployments, bypass rate limits, and explore advanced use cases. Note that this feature is currently only available to individual users, not Copilot Business or Enterprise accounts.22. How to use your own API key
To use your own model: Open the chat model picker, click Manage Models, select your provider, enter your API key, and any other required info (such as endpoint URL or model name). Once connected, you'll see that model appear in the picker. You can now switch to it just like you would with a built-in model.23. Bring your own API key: limitations
When using your own model, take into account that it only applies to chat, not completions or commit messages. It may also lack certain features like tool support, vision, or syntax awareness, and Copilot continues to rely on its own systems for tasks like indexing.24. Switching the completions model
To change the model you use for code completions: Open the Copilot menu from the title bar, choose Configure Code Completions, select Change Completions Model, and choose a different model from the list. This can be helpful if you want a more consistent tone or pattern for your autocomplete suggestions.25. The best model depends on your task
In short, there's no single "best model."26. The best model depends on your task
You can try different ones based on your task.27. Let's practice!
Now, let's put your knowledge to the test!Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.