Models in GitHub Copilot
GitHub Copilot lets you choose which AI model powers your responses — you can switch between models from different providers without leaving Copilot.
The 30-second version: Copilot is not tied to one model. It supports models from OpenAI, Anthropic, Google, and xAI. Switching the model changes the reasoning engine underneath — it doesn’t change Copilot’s interface, your context, or your settings. Different models have different strengths; the best choice depends on your task.
⚠️ Changing your model is NOT switching AI assistants. You’re still in GitHub Copilot. You’re choosing which LLM Copilot calls. The What is a Model? page explains the difference between the model and the assistant.
Available models
The table below shows a selection of models available in GitHub Copilot and what each is best suited for.
| Model | Provider | Best for |
|---|---|---|
| GPT-5.4 | OpenAI | General coding, fast responses |
| GPT-5.4 mini | OpenAI | Quick tasks, lower latency |
| Claude Sonnet 4.5 | Anthropic | Balanced quality and speed |
| Claude Opus 4.6 | Anthropic | Complex reasoning, longer context |
| Gemini 2.5 Pro | Long context, multi-modal tasks | |
| Grok Code Fast 1 | xAI | Fast code-focused tasks |
Model availability depends on your Copilot plan and organisation policy. The list above reflects models available at time of writing and may have grown since.
How to switch models
- Open Copilot Chat in your IDE.
- Click the model selector (shown in the chat input area).
- Choose a model from the dropdown.
- Your next message uses the new model — no restart needed.
Which model should I use?
There is no single right answer, but these starting points cover most situations:
- For everyday coding tasks: Any model works well. Start with the default.
- For complex architectural decisions: Claude Opus 4.6 or Gemini 2.5 Pro handle long context better.
- For speed: GPT-5.4 mini or Grok Code Fast 1.
- For long files / large codebases: Models with larger context windows (Claude, Gemini).
Tip: The best model is the one that gives you useful answers. It’s worth experimenting — switch mid-session if a model isn’t giving you what you need.
Models and agent mode
In Agent Mode, Copilot uses the model currently selected in Copilot Chat in your IDE. The Copilot coding agent is configured separately: you choose its model for each task in the coding agent UI, and it does not use or sync with the model selected in your IDE chat. For both experiences, some complex multi-step tasks perform better with larger, more capable models.
What model-switching actually is
Most AI coding tools give you one model and no choice. Copilot gives you access to a growing catalog of models, depending on your plan and organisation policy. This isn’t a feature for its own sake — it means you can match the engine to the work.
Here’s what changes when you switch models:
- Response speed — Speed-optimized models (GPT-5.4 mini, Grok Code Fast 1) return answers in 2–3 seconds. Deep reasoning models (Claude Opus 4.6, GPT-5.4) might take 10–15 seconds. If you’re asking a quick syntax question, fast wins. If you’re debugging a race condition in async code, reasoning depth wins.
- Context window size — Context windows range from 16,000 tokens (about 50 pages of text) to 1,000,000 tokens (roughly 3,000 pages). If you’re asking Copilot to review a 5,000-line file or compare multiple modules, you need a large context window. Small-context models truncate or summarize, losing detail.
- Reasoning vs prediction — Some models predict tokens one by one (fast, good for code generation). Reasoning models think step-by-step before answering (slower, better for debugging and architecture). For “complete this function,” prediction works. For “why does this fail intermittently?”, you need reasoning.
- Specialization — Some models are trained specifically for code (GPT-5.3-Codex, GPT-5.2-Codex). Claude excels at writing and documentation. Gemini scales for huge codebases. Codex variants handle agentic multi-file workflows. Code-specialized models often handle obscure syntax better.
The tradeoff: Speed and capability are inversely related. Fast models sacrifice reasoning depth to return answers quickly. Capable models take longer because they’re doing more internal work. There is no one best model — only the best model for this task right now.
The real capability differences
The available models table tells you which models exist. This section tells you what the differences actually mean in practice — and how to tell when you’ve chosen the wrong model.
Speed vs reasoning depth
Speed-optimized models (GPT-5.4 mini, Grok Code Fast 1) use smaller parameter counts and less inference time. They return answers in 2–5 seconds. The cost: they reason less deeply. For straightforward tasks — “what does this function do?”, “convert this loop to a list comprehension” — that’s fine. For complex tasks — “why is this auth flow failing under race conditions?”, “should this be event-driven or polling?” — they’ll miss nuance.
Deep reasoning models (Claude Opus 4.6, GPT-5.4, Gemini 2.5 Pro) take longer (8–20 seconds) but handle complexity better. They use multi-step reasoning processes: breaking the problem down, considering alternatives, then synthesizing. Use these when the task requires judgment, tradeoffs, or debugging non-obvious issues.
How to tell a model is wrong for your task:
- It gives surface-level answers when you need depth (“just add a try-catch” when the real issue is architectural)
- It misses edge cases you expected it to catch (concurrency, null handling, off-by-one errors)
- Its code suggestion compiles but doesn’t handle the scenario you described
- It confidently states something incorrect (hallucination — more common in fast models under pressure)
- It produces incomplete explanations or skips reasoning steps you asked for
If any of these happen, switch to a more capable model and re-ask. Don’t try to fix a shallow answer with follow-ups — start over with the right model.
Context window differences and what they mean
The context window is how much text the model can “see” at once — your conversation history, any files you’ve pasted, and its response, all combined. Context windows in Copilot range from 16,000 tokens to 1,000,000 tokens (roughly 50 pages to 3,000 pages).
- Small context (16K–32K tokens): Fits a single file and a short conversation. If you’re working on one function or class, this is enough.
- Medium context (64K–128K tokens): Fits 2–3 files or a long conversation with history. Good for comparing modules or reviewing related classes.
- Large context (200K–1M tokens): Fits entire modules, multiple packages, or a full day’s conversation. If you’re asking Copilot to “review this entire API surface” or “refactor this auth system across 8 files”, you need large context.
Models with the largest context windows: Gemini 2.5 Pro (1M tokens), Claude Opus 4.6 (200K), Claude Sonnet 4.5 (200K). Medium context: GPT-5.4 (128K). Smaller context: GPT-5.4 mini (16K–32K).
In practice: If Copilot’s answer feels vague, misses details you provided earlier in the conversation, or says “based on the code you showed” when you pasted more than it references, you’ve hit the context limit. Switch to a large-context model and re-paste the full context.
Tip: Context window isn’t just about size — it’s about retention. Large-context models (Claude, Gemini) are trained to maintain coherence across long conversations. Smaller models may technically fit the tokens but lose track of earlier context.
Reasoning models vs completion models
Completion models predict the next token based on what came before. They’re very fast and work well for code generation — “complete this function”, “write a test for this class”, “generate a REST endpoint for X”. They don’t explicitly plan; they generate token by token. This is how autocomplete works.
Reasoning models (Claude Opus 4.6, GPT-5.4, Gemini 2.5 Pro) use chain-of-thought or multi-step processes. They “think” before answering — breaking the problem down, considering alternatives, testing logic internally, then synthesizing an answer. This takes longer but produces better results for:
- Debugging complex issues (“why does this fail intermittently when load is high?”)
- Architecture decisions (“should this be a class or a function? Should I use a service layer?”)
- Refactoring (“rewrite this module to separate concerns without breaking existing behavior”)
- Security reviews (“what attack vectors does this code expose?”)
Rule of thumb: If the task requires judgment, tradeoffs, or multi-step logic, use a reasoning model. If it’s straightforward code generation or completion, fast models are just as good and much quicker.
Task-based guidance
This is opinionated guidance based on capability profiles and Cereal’s research matrix. Your mileage may vary — experiment and find what works for you.
Quick edits and simple refactoring
Best choice: GPT-5.4 mini, Grok Code Fast 1
Why: For tasks like “rename this variable”, “reformat this JSON”, “add type hints to these three functions”, or “convert this dict to a dataclass”, you don’t need deep reasoning — you need fast, correct execution. Speed-optimized models are 5–10x faster and just as accurate for simple transformations.
Avoid: Claude Opus 4.6, Gemini 2.5 Pro (overkill — they’re slower and you’re not using their reasoning depth)
Writing tests and documentation
Best choice: Claude Sonnet 4.5, GPT-5.3-Codex
Why: Writing tests and docs requires understanding code intent, edge cases, and structure — but not necessarily deep architectural reasoning. Claude excels at long-form writing and explaining “why”. GPT-5.3-Codex is trained on code patterns and test structures. Both produce well-organized, thorough output without the latency of Opus-class models.
When to upgrade: If you’re documenting a complex system (distributed architecture, security-critical flows), use Claude Opus 4.6 for deeper analysis.
Code review and explanation
Best choice: Claude Sonnet 4.5, GPT-5.4, Claude Opus 4.6
Why: Reviewing code requires understanding intent, spotting edge cases, and explaining tradeoffs. Claude models are particularly strong at long-form explanations with clear reasoning. GPT-5.4 is concise but thorough.
When to upgrade to Opus: If the code is complex (async, concurrency, security-critical, performance-sensitive), Claude Opus 4.6 catches more edge cases than Sonnet. Its deeper reasoning identifies subtle bugs that completion-style models miss.
Complex debugging and architectural decisions
Best choice: Claude Opus 4.6, GPT-5.4, Gemini 2.5 Pro
Why: These are the most capable reasoning models in Copilot’s catalogue. For tasks like “debug why this distributed system has intermittent consistency issues”, “should I use event sourcing or CRUD?”, or “refactor this monolith into bounded contexts”, you need deep reasoning and large context windows. Opus excels at structured, multi-step thinking. GPT-5.4 balances reasoning and speed. Gemini handles massive context (useful if you’re reasoning over a large codebase).
Second choice: GPT-5.3-Codex (strong for code-specific architectural decisions, but smaller context than Opus/Gemini)
Repository-wide refactoring and multi-file edits
Best choice: GPT-5.2-Codex, GPT-5.3-Codex, Claude Opus 4.6
Why: Codex variants are trained specifically for agentic, multi-file workflows. They excel at understanding cross-file dependencies, maintaining consistency across edits, and handling large-scale refactorings. Use these in Agent Mode when you’re making changes that span 5+ files or require understanding how modules interact.
Fallback: Gemini 2.5 Pro (massive context window handles large codebases, but less specialized for agentic workflows than Codex)
Chat and quick questions
Best choice: GPT-5.4 mini, Claude Sonnet 4.5
Why: For “what does this error mean?”, “how do I install X?”, “what’s the syntax for Y?”, or “explain this config option”, you want a fast answer. GPT-5.4 mini is very low latency. Claude Sonnet 4.5 is slightly slower but handles follow-ups well and provides clearer explanations than mini models.
Avoid: Large models (Opus, Gemini 2.5 Pro) — they’re 5–10x slower and you’re not using their capabilities for simple Q&A
Long files and large codebases
Best choice: Gemini 2.5 Pro, Claude Opus 4.6, Claude Sonnet 4.5
Why: These have the largest context windows (200K–1M tokens). If you’re pasting a 3,000-line file, asking Copilot to “review the entire auth module across 8 files”, or working in a long conversation with lots of history, you need a model that won’t truncate. Gemini 2.5 Pro’s 1M token window is the largest available — use it for whole-repo analysis or when context retention matters.
Fallback: GPT-5.4 (128K context) — still large, but less headroom than Claude/Gemini for truly massive codebases
Model choice in chat, agent mode, and the coding agent
This is where it gets confusing. Copilot has multiple “surfaces” — Chat, Agent Mode, and the Copilot Coding Agent (cloud). Each surface has its own model selector, and they don’t sync. Understanding which model applies where is the most under-documented part of Copilot’s multi-model support.
In Copilot Chat (your IDE)
Where the model selector is: Bottom of the chat panel (VS Code), or top of the conversation (GitHub.com)
How it works: Full dropdown with all available models (GPT-5.4, Claude Sonnet 4.5, Claude Opus 4.6, Gemini 2.5 Pro, Grok, and others depending on your plan). You pick a model; every message you send after that uses the selected model until you change it.
Does it persist? Per-session only. If you close the chat panel and reopen it, the model resets to the default (usually GPT-5.4 or your org’s policy default).
Who can change it? Copilot Pro and Enterprise users have full access to the dropdown. Individual/Free plans may have restricted model access depending on org policy.
In Agent Mode (autonomous IDE editing)
Does Agent Mode use the same model you selected in Chat? Yes. Agent Mode is not a separate system — it’s Copilot Chat with tool access (file editing, terminal commands, etc.). Whatever model you selected in Chat is the model Agent Mode uses to reason, plan, and execute file edits.
Can you switch models mid-task? Yes. If you start Agent Mode with GPT-5.4 mini and it’s struggling with a complex refactoring, switch to Claude Opus 4.6 or GPT-5.3-Codex and tell it to continue. The new model picks up from where the old one left off (it reads the full conversation history).
Which model should you use for Agent Mode? For multi-file edits and complex refactorings, use reasoning models with large context: GPT-5.2-Codex, GPT-5.3-Codex, Claude Opus 4.6, or Gemini 2.5 Pro. Agent Mode involves planning and iteration — you want reasoning depth and context retention, not speed. Fast models (GPT-5.4 mini, Grok Code Fast 1) often miss dependencies or make inconsistent edits across files.
In the Copilot Coding Agent (cloud)
What is the Copilot Coding Agent? It’s the async, cloud-based agent that runs in GitHub Actions and creates PRs. It is NOT the same as Agent Mode. (See Copilot Coding Agent for the full distinction.)
Where is the model selector? In the GitHub web UI when you configure a coding agent task. This is a separate picker from your IDE chat selector. The two do not sync.
Does it use your IDE chat model? No. The Copilot Coding Agent runs independently in GitHub’s cloud. You select a model in the web UI when you start the task, but that selection is specific to the coding agent — it doesn’t use the model you selected in your IDE.
Which models are available? The coding agent has access to the same model catalogue as Chat (GPT-5.4, Claude, Gemini, Codex variants), but availability depends on your GitHub plan and org policy.
Why are there separate pickers? The coding agent is a hosted service that runs async workflows. GitHub provides a web UI picker to let you choose a model for that specific task. Your IDE chat picker controls local (or IDE-hosted) chat sessions. They’re different execution contexts, so they have separate selectors.
Inline completions (autocomplete)
Is there a model picker for inline completions? No. Inline completions (the gray autocomplete suggestions that appear as you type) use a model configured by your organization admin. Individual users cannot select or change the inline completion model.
Which model is used? This varies by org policy. Check with your admin or GitHub’s settings if you want to know which model powers your autocomplete.
Can you set a default model across all surfaces?
Short answer: Not as of early 2026.
Per-surface defaults:
- Chat (IDE): No persistent user default. The model resets to a system/org default each session. You must manually select your preferred model each time you open a new chat.
- Agent Mode: Uses whatever you selected in Chat (same selector).
- Coding Agent (cloud): You pick a model each time you start a task in the web UI. No persistent default.
- Inline completions: Admin-configured only. No user control.
Organization policies: Some orgs use Copilot policies to enforce a default model for all users (e.g., “everyone uses GPT-5.4”). Individual users cannot override org-level defaults unless the policy allows it.
Workaround: If you consistently prefer one model for chat, select it at the start of each session. It’s one click. For coding agent tasks, select your preferred model in the web UI each time — the picker remembers your last choice within that browser session.
Keeping this page up to date
Model availability changes frequently. GitHub adds new models every 2–4 weeks and announces retirements with 3–6 months’ notice. What’s documented here reflects early 2026. For the current model list and retirement announcements, check:
- Model comparison table — side-by-side capability grid
- Supported AI models in Copilot — full catalogue with availability by plan
- GitHub Changelog — new model announcements and deprecations
Maintenance cadence: This page is reviewed quarterly (every 3 months). If a new model is added mid-quarter and you notice it’s missing, open an issue or PR — we’ll update immediately rather than waiting for the next review cycle.
Why quarterly? Model capabilities don’t change often (a model’s reasoning depth and context window are fixed at release). What changes is which models are available — GitHub adds and retires models as providers release new versions. A quarterly review catches those changes without over-documenting minor capability differences.
What to do when your model is deprecated: GitHub announces deprecations 3–6 months in advance. When your preferred model is scheduled for retirement:
- Check the announcement for the recommended replacement model (usually listed)
- Test the replacement model with your typical tasks before the deprecation date
- Update any org policies or documentation that reference the old model name
- If no direct replacement is listed, use the task-based guidance above to choose a new model
What the official docs don’t cover: GitHub’s documentation tells you which models are available and how to switch. This page explains why different models behave differently, how to tell when you’ve chosen the wrong model for your task, and what to expect from context windows and reasoning depth in practice. For the official technical specs, use the links above. For practical task-based guidance, this is the page.
Dive deeper
- What is a Model? — understanding what models are
- Models vs Agents — how models relate to agents
- GitHub Copilot Overview — where models fit in the full picture
Related Concepts
- What is a Model? — The underlying concept behind every model you select in Copilot
- Models vs Agents — How model selection relates to the agent vs assistant distinction
- GitHub Copilot Overview — Where model selection fits in Copilot’s full multi-layer picture
📍 Layer 0 — The Model · Back to the AICA Onion
What’s next?
- Extensions, Tools & MCP — third-party tools and integrations for Copilot