Skip to main content

15 - AI Models in Copilot: Selection Guide

Complete comparison of AI models in Copilot: GPT-4.1, Claude Opus/Sonnet/Haiku, Gemini. Auto Mode, manual selection, premium requests, and optimal use cases.

What do you think about this article?

At a Glance

Complete comparison of AI models in Copilot: GPT-4.1, Claude Opus/Sonnet/Haiku, Gemini. Auto Mode, manual selection, premium requests, and optimal use cases.

AI Models in GitHub Copilot: Complete Guide to Choosing

GitHub Copilot has adopted a multi-model architecture that represents a fundamental change in how AI development tools operate. Instead of depending on a single language model, Copilot offers access to a range of models from three of the leading AI providers: OpenAI, Anthropic and Google. Each model has distinct characteristics, strengths and limitations, and choosing the right one for the specific task can make a significant difference in result quality and work speed.

In this fifteenth article of the series, we will explore in detail all the models available in Copilot, their technical characteristics, the criteria for selection, the Auto Mode system for automatic selection, the cost implications with premium requests, and the best practices for getting the most out of each model.

Complete Series Overview

#ArticleFocus
1Foundation and MindsetSetup and mindset
2Ideation and RequirementsFrom idea to MVP
3Backend ArchitectureAPI and database
4Frontend StructureUI and components
5Prompt EngineeringPrompts and MCP Agents
6Testing and QualityUnit, integration, E2E
7DocumentationREADME, API docs, ADR
8Deploy and DevOpsDocker, CI/CD
9EvolutionScalability and maintenance
10Coding AgentAutonomous development agent
11Code ReviewAutomatic AI review
12Copilot Edits and Agent ModeMulti-file editing
13GitHub SparkApps from natural language
14Copilot Spaces and MemoryOrganized context and memory
15You are here → AI ModelsGuide to model selection
16CustomizationCustom instructions and knowledge
17Enterprise and BusinessCopilot for organizations
18Extensions and MarketplaceExtending Copilot with tools
19SecuritySecurity and AI compliance

Available Models

GitHub Copilot provides access to models from three main families, each with distinct strengths. Understanding the differences is the first step to using them effectively.

OpenAI Family

OpenAI models were the first to power Copilot and remain a solid choice for many development tasks. They are hosted on OpenAI and Microsoft Azure infrastructure, ensuring high availability and low latency for users in North America and Europe.

OpenAI Models in Copilot

ModelSpeedAccuracyContext WindowMultimodalCost
GPT-4.1MediumHigh128K tokensImagesStandard
GPT-4.5SlowVery High128K tokensImagesPremium
o3-miniFastMedium-High128K tokensNoStandard

GPT-4.1

GPT-4.1 is the workhorse of the OpenAI family in Copilot. It offers an excellent balance between speed and quality, making it suitable for most daily development tasks. It has a deep understanding of code structure, programming best practices and conventions of major frameworks.

Compared to its predecessor GPT-4o, GPT-4.1 shows significant improvements in structured code generation, long context comprehension and the ability to follow complex instructions. It is particularly effective in boilerplate generation, scaffolding and translating requirements into code.

GPT-4.5

GPT-4.5 represents OpenAI's flagship model, with superior reasoning capabilities compared to GPT-4.1. It is the model to choose for tasks requiring in-depth analysis, complex reasoning or understanding of intricate systems. The quality of responses is notably superior, but at the cost of higher latency and the consumption of premium requests.

GPT-4.5 excels in scenarios such as debugging complex problems, analyzing distributed architectures, resolving non-trivial merge conflicts and generating optimized algorithms. The trade-off between response time and quality makes it ideal for tasks where accuracy is more important than speed.

o3-mini

The o3-mini model is designed for speed. It is significantly faster than other OpenAI models, with response quality that, while being inferior to GPT-4.1 for complex tasks, remains adequate for many daily scenarios. Being classified as a standard model, it does not consume premium requests.

It is the ideal choice for repetitive tasks, boilerplate code generation, quick completions and fast iterations where feedback speed takes priority over result perfection.

Anthropic Family (Claude)

Anthropic's Claude models are hosted on AWS, Anthropic and Google Cloud Platform. They are known for their excellent in-depth analysis capabilities, long context comprehension and production of well-structured and detailed responses.

Claude Models in Copilot

ModelSpeedAccuracyContext WindowMultimodalCost
Claude Haiku 4.5Very FastMedium200K tokensImagesStandard
Claude Sonnet 3.7MediumHigh200K tokensImagesStandard
Claude Opus 4SlowVery High200K tokensImagesPremium

Claude Haiku 4.5

Haiku 4.5 is the fastest model in the Claude family, designed to respond quickly while maintaining adequate quality for routine tasks. Its 200K token context window makes it particularly useful when working with many open files or using Repository Indexing on large codebases.

It is an excellent choice for quick completions, simple code questions, basic test generation and operations where immediate feedback is the priority. The combination of speed and wide context makes it an ideal complement to more powerful but slower models.

Claude Sonnet 3.7

Sonnet 3.7 represents the balanced model in the Claude family and is one of the most appreciated models among developers for overall response quality. It combines good response speed with advanced analytical capabilities, making it suitable for a wide range of tasks.

It is particularly strong in code review, complex bug analysis, code generation following specific patterns and production of detailed technical documentation. Its ability to understand broad context makes it effective when working with large codebases where relationships between files are important.

Claude Opus 4

Opus 4 is Anthropic's flagship model, with top-of-class reasoning capabilities. It is the model to choose for the most complex and challenging tasks: deep architectural analysis, debugging systemic problems, designing solutions for ambiguous requirements and refactoring legacy systems.

The combination of advanced reasoning and a 200K token context window makes it unique in the landscape of models available in Copilot. The cost is one premium request per interaction, so it should be used strategically for tasks where superior quality justifies the consumption.

Google Family (Gemini)

Google's Gemini models are hosted on Google Cloud Platform and bring distinctive capabilities, particularly in the multimodal domain and in processing very large context windows.

Gemini Models in Copilot

ModelSpeedAccuracyContext WindowMultimodalCost
Gemini 2.0 FlashVery FastMedium1M tokensImages, VideoStandard
Gemini 3 FlashFastMedium-High1M tokensImages, VideoStandard
Gemini 3 ProMediumHigh1M tokensImages, Video, AudioPremium
Gemini 2.5 ProMedium-SlowHigh1M tokensImages, VideoPremium

Gemini 2.0 Flash

Flash 2.0 is the fastest model in the Gemini family, optimized for quick responses with a good level of quality. Its distinctive feature is the 1 million token context window, enormously larger than any other model available in Copilot. This makes it particularly suited for working with very large repositories or when you need to include many files in the context.

Gemini 3 Flash and Gemini 3 Pro

The third generation of Gemini brings significant improvements in both speed and quality. Gemini 3 Flash offers excellent quality for a fast model, while Gemini 3 Pro competes with the flagship models from OpenAI and Anthropic in accuracy and reasoning capability.

Gemini 3 Pro stands out for its advanced multimodal capability: it can analyze not only images but also video and audio, making it unique for scenarios such as analyzing bug screencasts, understanding complex architectural diagrams and transcribing technical meetings.

Gemini 2.5 Pro

Gemini 2.5 Pro is a model with excellent reasoning and coding capabilities, positioned as an alternative to GPT-4.5 and Claude Opus 4. The combination of high quality and a 1M token context window makes it particularly suited for analyses that require understanding large amounts of code simultaneously.

Complete Comparison Table

To facilitate selection, here is a direct comparison of all available models on the most relevant parameters for software development.

Complete Model Comparison

ModelProviderSpeedCode QualityReasoningContextCost
GPT-4.1OpenAIMediumHighHigh128KStandard
GPT-4.5OpenAISlowVery HighVery High128KPremium
o3-miniOpenAIFastMedium-HighMedium-High128KStandard
Haiku 4.5AnthropicVery FastMediumMedium200KStandard
Sonnet 3.7AnthropicMediumHighHigh200KStandard
Opus 4AnthropicSlowVery HighVery High200KPremium
Gemini 2.0 FlashGoogleVery FastMediumMedium1MStandard
Gemini 3 FlashGoogleFastMedium-HighMedium-High1MStandard
Gemini 3 ProGoogleMediumHighHigh1MPremium
Gemini 2.5 ProGoogleMedium-SlowHighHigh1MPremium

Auto Mode: Automatic Model Selection

Auto Mode is Copilot's default mode that automatically selects the most suitable model based on the type of task requested. Instead of having to manually choose which model to use for each interaction, Auto Mode analyzes your request and decides which model will deliver the best result.

How Auto Mode Works

The automatic selection system evaluates several factors to determine the optimal model:

Auto Mode Selection Factors

FactorDescriptionImpact on Choice
Task complexityHow complex the request isSimple tasks → fast models; complex tasks → powerful models
Operation typeCompletion, generation, analysis, debugDifferent models excel at different operations
Context sizeHow many files and tokens are involvedLarge context → models with wide window
Required speedIf the user is actively typingInline completion → fast models
Premium request budgetHow many premium requests remainLow budget → preference for standard models
Previous historyWhich models have worked well for similar tasksFavors models with positive track record

When to Use Auto Mode

Auto Mode is recommended in most scenarios. The main advantages are:

  • No decision needed: You don't have to spend time choosing the model
  • Cost optimization: The system balances quality and premium request consumption
  • Dynamic adaptation: If the request evolves in complexity, the model can change
  • Built-in best practices: The selection system incorporates GitHub's best practices

When Auto Mode Might Not Be Ideal

There are scenarios where manual selection can deliver better results:

  • Tasks where you know a specific model excels (e.g., Claude for code review)
  • When you want to guarantee consistency in response quality across multiple sessions
  • For critical tasks where you always want the most powerful model available
  • When working with very large contexts (1M+ tokens) and you want to force Gemini usage
  • To experiment and compare responses from different models on the same prompt

Manual Model Selection

In supported IDEs (VS Code, JetBrains, Visual Studio), you can manually select the model to use for each conversation. Selection happens through a dropdown menu in the Copilot Chat window.

Where to Select the Model

Model Selection by IDE

IDEHow to SelectWhere
VS CodeDropdown in the Copilot Chat headerSide panel or inline window
JetBrainsDropdown in the Copilot Chat headerTool window panel
Visual StudioDropdown in the Copilot Chat headerCopilot panel
GitHub.comSelector in the Copilot Chat panelSidebar or dedicated page
GitHub MobileSelector before starting the chatChat start screen
CLI (gh copilot)--model flag in the command lineTerminal

When Manual Selection is Better

Manual selection is particularly useful in these scenarios:

Scenarios for Fast Models

  • Inline completions while writing
  • Quick syntax questions
  • Repetitive boilerplate generation
  • Variable renaming across multiple files
  • Format conversion (JSON → YAML, etc.)
  • Generating comments for existing code
  • Fixing syntax errors

Scenarios for Powerful Models

  • Debugging intermittent problems
  • Designing complex architectures
  • Refactoring legacy systems
  • Code security analysis
  • Algorithm optimization
  • Resolving complex merge conflicts
  • Generating tests for edge cases

Recommendations by Use Case

Based on the characteristics of each model, here are the recommendations for the most common use cases in software development.

Daily Coding Tasks

Recommended Models for Daily Tasks

TaskRecommended ModelAlternativeWhy
Inline completiono3-mini / Haiku 4.5Gemini 2.0 FlashSpeed is the priority, completion must be instant
Function generationGPT-4.1Sonnet 3.7Good quality with reasonable speed
Local refactoringSonnet 3.7GPT-4.1Good understanding of patterns and context
Test generationSonnet 3.7GPT-4.1Understands well edge cases and test patterns
Simple bug fixGPT-4.1Gemini 3 FlashFast and accurate for localized fixes

Speed and Prototyping

Models for Speed and Prototyping

TaskRecommended ModelAlternativeWhy
Project scaffoldingo3-miniGemini 2.0 FlashRapidly generates project structures
Quick prototypeGemini 2.0 Flasho3-miniFast with good context for rapid iterations
Code conversionHaiku 4.5o3-miniTranslation between languages for simple tasks
Mock data generationHaiku 4.5Gemini 2.0 FlashMechanical task, speed is everything
CRUD boilerplateo3-miniHaiku 4.5Repetitive patterns, speed is the priority

Complex Reasoning

Models for Complex Tasks

TaskRecommended ModelAlternativeWhy
Complex debuggingOpus 4GPT-4.5Deep reasoning for intricate problems
Architectural designGPT-4.5Opus 4Big picture vision and planning ability
Algorithm optimizationOpus 4Gemini 2.5 ProSuperior mathematical reasoning
Framework migrationGemini 2.5 ProOpus 41M context to understand the entire codebase
Security analysisOpus 4Sonnet 3.7Attention to detail for subtle vulnerabilities

Code Review

Models for Code Review

TaskRecommended ModelAlternativeWhy
Small PR reviewSonnet 3.7GPT-4.1Excellent quality/speed balance for reviews
Large PR reviewOpus 4Gemini 2.5 ProWide context and deep reasoning
Security reviewOpus 4Sonnet 3.7Maximum attention to dangerous patterns
Performance reviewGPT-4.5Opus 4Good understanding of big-O and optimizations
Style reviewSonnet 3.7GPT-4.1Understands conventions well and suggests improvements

Documentation

Models for Documentation

TaskRecommended ModelAlternativeWhy
JSDoc/TSDocGPT-4.1Sonnet 3.7Generates structured and precise documentation
Complete READMESonnet 3.7GPT-4.1Produces well-structured and readable text
API documentationGPT-4.1Gemini 3 ProUnderstands OpenAPI and REST formats well
ADR (Architecture Decision Record)Opus 4GPT-4.5In-depth analysis of trade-offs and alternatives
Tutorials/GuidesSonnet 3.7GPT-4.1Clear, didactic, well organized

Premium Requests: Understanding Costs

Copilot's multi-model architecture introduces the concept of premium requests: some interactions consume additional resources and are counted separately from the user's monthly budget. Understanding this system is essential for effectively managing your usage.

What Counts as a Premium Request

Not all interactions with Copilot are equal in terms of computational cost. Premium requests correspond to the use of top-tier models that require more resources to generate responses.

Request Classification

TypeModelsCost
StandardGPT-4.1, o3-mini, Haiku 4.5, Sonnet 3.7, Gemini 2.0 Flash, Gemini 3 FlashDoes not count as premium
PremiumGPT-4.5, Opus 4, Gemini 3 Pro, Gemini 2.5 Pro1 premium request per interaction

Allocation by Plan

Each Copilot plan includes a different number of monthly premium requests. Once the budget is exhausted, the user can continue using only standard models or purchase additional premium requests.

Premium Requests per Plan

PlanPremium Requests/MonthPriceCost per Additional Request
Free50$0Not available
Pro300$10/monthNot available (upgrade to Pro+)
Pro+1,500$39/monthIncluded in plan
Business300 per user$19/user/month$0.04 per request
Enterprise1,000 per user$39/user/month$0.04 per request

Premium Request Management Strategy

To optimize premium request usage without sacrificing work quality, follow these strategies.

Save Premium For

  • Debugging critical production issues
  • Important architectural analyses
  • Code review of critical PRs
  • Designing complex new features
  • Code security analysis
  • Performance optimization
  • Refactoring legacy systems

Use Standard For

  • Inline completions while writing
  • Boilerplate and CRUD generation
  • Quick syntax questions
  • Generating comments and JSDoc
  • Fixing compilation errors
  • Data format conversion
  • Repetitive and mechanical tasks
Example - Cost-Optimized Workflow
SCENARIO: Developing a new feature (API endpoint for reporting)

PHASE 1 - Scaffolding (Standard model: o3-mini)
"Generate the scaffolding for a new report module:
controller, service, repository, DTO, test file"
>> Cost: 0 premium requests

PHASE 2 - Base implementation (Standard model: GPT-4.1)
"Implement the service with methods:
generateDailyReport, generateWeeklyReport, exportToCsv"
>> Cost: 0 premium requests

PHASE 3 - Complex logic (Premium model: Opus 4)
"Analyze this SQL query for the aggregated report.
There are 3 joins and 2 subqueries. Optimize it to
handle 10M+ rows in under 2 seconds"
>> Cost: 1 premium request

PHASE 4 - Testing (Standard model: Sonnet 3.7)
"Generate unit tests for ReportService covering
all methods, edge cases and error handling"
>> Cost: 0 premium requests

PHASE 5 - Code Review (Premium model: Opus 4)
"Complete review of the report module: security,
performance, best practices, potential bugs"
>> Cost: 1 premium request

TOTAL: 2 premium requests for a complete feature

Model Availability by Plan

Not all models are available on all plans. Here is the complete availability matrix.

Availability Matrix

ModelFreeProPro+BusinessEnterprise
GPT-4.1YesYesYesYesYes
GPT-4.5LimitedYesYesYesYes
o3-miniYesYesYesYesYes
Haiku 4.5YesYesYesYesYes
Sonnet 3.7YesYesYesYesYes
Opus 4LimitedYesYesYesYes
Gemini 2.0 FlashYesYesYesYesYes
Gemini 3 FlashYesYesYesYesYes
Gemini 3 ProLimitedYesYesYesYes
Gemini 2.5 ProLimitedYesYesYesYes

"Limited" means the model is accessible but with a reduced number of premium requests (50/month for the Free plan).

Multimodal Capabilities

An increasingly important aspect in model selection is the support for multimodal input, meaning the ability to analyze not only text and code but also images, video and other formats.

Multimodal Capabilities by Model

ModelText/CodeImagesVideoAudio
GPT-4.1YesYesNoNo
GPT-4.5YesYesNoNo
o3-miniYesNoNoNo
Haiku 4.5YesYesNoNo
Sonnet 3.7YesYesNoNo
Opus 4YesYesNoNo
Gemini 2.0 FlashYesYesYesNo
Gemini 3 FlashYesYesYesNo
Gemini 3 ProYesYesYesYes
Gemini 2.5 ProYesYesYesNo

Multimodal Use Cases in Development

Multimodal capabilities open up interesting scenarios for software development that go beyond traditional code generation.

Practical Multimodal Scenarios

ScenarioInputRecommended ModelOutput
Bug from screenshotUI error screenshotSonnet 3.7, GPT-4.1Bug identification and CSS/HTML fix
Implement from wireframeWireframe imageGemini 3 Pro, GPT-4.1HTML/CSS code that reproduces the design
Diagram analysisArchitectural diagramGemini 3 Pro, Opus 4Architecture analysis and suggestions
Debug from videoBug screencastGemini 3 ProIdentification of steps causing the bug
UI accessibilityPage screenshotGPT-4.1, Sonnet 3.7Accessibility and contrast issue analysis
Responsive checkMobile + desktop screenshotsGemini 3 Flash, GPT-4.1Identification of responsive layout issues

Best Practices for Model Selection

After analyzing all models and their use cases, here are the general guidelines for optimizing selection.

The 80-15-5 Rule

A good rule of thumb for model usage distribution is:

Recommended Distribution

PercentageModel TypeExamplesTasks
80%Balanced standardGPT-4.1, Sonnet 3.7Daily coding, generation, tests, docs
15%Fasto3-mini, Haiku 4.5, Gemini FlashCompletions, boilerplate, repetitive tasks
5%Premium powerfulOpus 4, GPT-4.5, Gemini ProComplex debugging, architecture, critical reviews

Quick Selection Workflow

Selection Flowchart

  1. Is the task simple and repetitive?
    • Yes → o3-mini or Haiku 4.5
  2. Does the task require understanding many files (50+)?
    • Yes → Gemini (1M context) or Claude (200K context)
  3. Does the task require complex reasoning or security analysis?
    • Yes → Opus 4 or GPT-4.5
  4. Does the task involve images, wireframes or screenshots?
    • Yes → GPT-4.1, Sonnet 3.7 or Gemini 3 Pro
  5. For everything else:
    • → Auto Mode or GPT-4.1 / Sonnet 3.7

Experiment and Compare

An often overlooked aspect is the importance of experimenting with different models on the same prompt. Different models can produce qualitatively different solutions for the same problem, and comparing responses can lead to valuable insights.

Example - Comparing Responses from Different Models
PROMPT: "How would you implement a rate limiting system
for a REST API with Node.js?"

GPT-4.1: Suggests express-rate-limit with Redis store,
         practical and immediate implementation.

Sonnet 3.7: First analyzes the different algorithms
            (token bucket, sliding window, fixed window),
            then suggests sliding window log with Redis.

Opus 4: Produces a complete architectural analysis
        with distributed rate limiting, grace period,
        retry-after headers, and monitoring integration.

Gemini 2.5 Pro: Proposes a solution with API Gateway
                pattern, comparison of managed solutions
                (Cloudflare, AWS WAF) vs custom.

CONCLUSION: Each model brings a different perspective.
The "best" depends on what you need at that moment.

Model Evolution

The AI model ecosystem is rapidly evolving. New models are released regularly and existing ones are improved. It is important to stay updated on new developments to make the most of the latest capabilities.

Trends in Model Evolution

TrendImpact on CopilotWhen to Expect
Ever-larger context windowsBetter understanding of large projectsOngoing (Gemini already at 1M)
Increasing speed of powerful modelsPremium models usable for daily tasks6-12 months
Decreasing costsMore premium requests included in plansContinuous
Coding specializationModels optimized specifically for developmentOngoing
Advanced agentic capabilitiesModels that autonomously execute multi-step tasksOngoing
Extended multimodalityAnalysis of video, audio, diagramsOngoing (Gemini lead)

IDE Configuration for Specific Models

For those who want to configure model preferences at the IDE level, here is how to set preferences in VS Code.

VS Code settings.json - Model Configuration
{
  // Default model for Copilot Chat
  "github.copilot.chat.defaultModel": "auto",

  // Model for inline completion (code suggestions)
  // Not all models support inline completion
  "github.copilot.advanced": {
    "model": "gpt-4.1"
  },

  // Configuration for Agent Mode
  "github.copilot.chat.agent.defaultModel": "claude-sonnet-3.7",

  // Enable/disable specific models
  "github.copilot.chat.models.enabled": [
    "gpt-4.1",
    "claude-sonnet-3.7",
    "claude-opus-4",
    "gemini-2.0-flash"
  ]
}

Configuration Notes

  • Not all models are available for inline completion (only an optimized subset)
  • Model settings can be overridden at the organization level on Business/Enterprise plans
  • Auto Mode is generally recommended as default; select manually only when you have specific needs
  • The exact model names in settings may vary: consult the updated documentation
  • Some features (like Agent Mode) may work better with specific models

Conclusion

GitHub Copilot's multi-model architecture represents a significant advantage over tools that depend on a single model. The ability to choose the most suitable model for each specific task, or to let Auto Mode make the choice for you, offers unprecedented flexibility in the developer's toolkit.

The key to making the most of this flexibility is understanding the strengths of each model and aligning them with your tasks. There is no "absolute best" model: the best is the one that produces the optimal result for the specific task you are facing.

The practical advice is: start with Auto Mode as default, use standard models (GPT-4.1, Sonnet 3.7) for daily work, and reserve premium requests for moments where superior quality truly makes a difference. Over time, you will develop a natural intuition about which model to choose for each situation.

Summary: Which Model to Choose

NeedRecommended Model
Default for everythingAuto Mode
Balanced daily codingGPT-4.1 or Sonnet 3.7
Maximum speedo3-mini or Haiku 4.5
Maximum qualityOpus 4 or GPT-4.5
Huge contextGemini 2.5 Pro or Gemini 3 Pro
Advanced multimodalGemini 3 Pro
In-depth code reviewClaude Sonnet 3.7 or Opus 4
Limited budgetGPT-4.1 + o3-mini (standard only)

Series Progress

#ArticleStatus
1Foundation and MindsetCompleted
2Ideation and RequirementsCompleted
3Backend ArchitectureCompleted
4Frontend StructureCompleted
5Prompt EngineeringCompleted
6Testing and QualityCompleted
7DocumentationCompleted
8Deploy and DevOpsCompleted
9EvolutionCompleted
10Coding AgentCompleted
11Code ReviewCompleted
12Copilot Edits and Agent ModeCompleted
13GitHub SparkCompleted
14Copilot Spaces and MemoryCompleted
15AI ModelsYou are here
16CustomizationNext
17Enterprise and BusinessNext
18Extensions and MarketplaceNext
19SecurityNext

Try These Tools

Free developer tools related to this topic.

Commenti

Caricamento commenti...

Sign in to comment

Discuss this article in the community

Join the Telegram group to discuss with other developers, ask questions and share your experiences.

Did you like this article?

Explore other content on the blog or discover my projects