Skip to content

Model Selection

Learn to select the right AI model for each task. This 10-minute guide will help you balance speed, cost, and capability to maximize productivity while controlling expenses.

ModelSpeedCostContextBest Use Case
Claude Sonnet 4.5⚡⚡⚡$1MDaily coding (95%+ of tasks) - best model
gpt-5-codex⚡⚡⚡$$$200kBug fixing & UI generation (Cursor)
Claude Opus 4⚡⚡$$$$$200kUltra-complex architecture (rare)
Gemini 2.5 Pro⚡⚡⚡$$1MExtreme context needs (>1M tokens)

Monthly Budget Impact

Typical Developer Usage

  • Sonnet 4.5 only: ~$50/month
  • Sonnet 4.5 + gpt-5-codex: ~$100/month
  • With Opus 4: ~$200/month (rarely needed)
  • Optimized: ~$50-100/month

Token Economics

Per Million Tokens

  • Sonnet 4.5: $3 (input) / $15 (output)
  • Opus 4: $15 / $75 (5x Sonnet)
  • gpt-5-codex: Premium (Cursor)
  • Gemini 2.5 Pro: $2 / $10

Released: September 29, 2025 (announcement)

  • All daily coding tasks (90%+ of work)
  • Feature implementation
  • Bug fixes (though gpt-5-codex specializes in this)
  • Code reviews
  • Large-scale refactoring (1M context!)
  • Test writing
  • Documentation
  • API integration
  • Database queries
  • Architecture design
  • Agent building
  1. Clear, specific prompts yield better results than vague requests
  2. Include examples in your prompts for consistent output
  3. Break complex tasks into smaller, focused requests
  4. Use project rules to maintain consistency
// EXCELLENT: Take advantage of 1M context with Sonnet 4.5
"Analyze the entire authentication system across all files,
identify security vulnerabilities, and refactor to use
industry best practices. Include tests for all changes."
// GOOD: Specific request for Sonnet 4.5
"Create a TypeScript function that validates email addresses
using regex, returns a Result<string, ValidationError> type,
and includes unit tests"

Available in: Cursor only

Decision Framework

Use gpt-5-codex when you need:

  1. Bug Fixing: Specialized training for identifying and fixing bugs quickly
  2. UI Generation: Excellent at creating and refining user interfaces
  3. Frontend Work: Strong understanding of React, Vue, Angular, and modern CSS
  4. Quick Iterations: Fast at UI tweaks and visual refinements
  1. Use for targeted bug fixes - especially production issues
  2. Great for component creation - UI components, forms, layouts
  3. Combine with Sonnet 4.5 - use codex for bugs/UI, Sonnet for architecture
  4. Fast iterations - quick feedback loop for visual work
// Use gpt-5-codex for bug fixing
"This button isn't responding to clicks on mobile.
Debug and fix the touch event handlers."
// Use gpt-5-codex for UI generation
"Create a responsive navigation menu with dropdown support,
mobile hamburger menu, and smooth animations."
// Switch to Sonnet 4.5 for broader work
"Now integrate this navigation into our routing system
and add proper authentication checks."

Decision Framework

Use Opus 4 only when:

  1. Ultra-Complex Architecture: System design that truly stumps Sonnet 4.5 (rare)
  2. Specific Deep Reasoning: When Sonnet 4.5 repeatedly fails (very rare)

Note: Try Sonnet 4.5 first. 95% of the time it’s enough, even for complex tasks.

  1. Start with Planning

    "Analyze our current authentication system and propose
    a migration plan to OAuth 2.0 with backward compatibility"
  2. Generate Architecture

    "Design a scalable event-driven architecture for our
    notification system supporting email, SMS, and push"
  3. Complex Problem Solving

    "Optimize this graph traversal algorithm for finding
    shortest paths in a weighted directed graph with
    negative edges"

Use Gemini 2.5 Pro only when:

  • Your codebase genuinely exceeds 1M tokens (very large monorepos)
  • You need to analyze absolutely everything at once
  • Sonnet 4.5’s 1M context isn’t enough (rare)

Reality: Sonnet 4.5’s 1M context handles most entire codebases. You probably won’t need Gemini 2.5 Pro.

graph TD Start[New Task] --> Type{Task Type?} Type -->|Bug Fix or UI| Codex[gpt-5-codex in Cursor] Type -->|Everything Else| Sonnet[Claude Sonnet 4.5] Codex --> Working{Working well?} Sonnet --> Working2{Working well?} Working -->|Yes| Done[Continue] Working -->|No| Sonnet Working2 -->|Yes| Done Working2 -->|No| Check{Exceeds 1M tokens?} Check -->|Yes| Gemini[Try Gemini 2.5 Pro] Check -->|No| Opus[Try Opus 4 - very rare]
  1. Start with Sonnet 4.5 for 90%+ of all work (it’s the best!)
  2. Use gpt-5-codex for bug fixes and UI generation
  3. Use o3 only for extremely complex debugging
  4. Use Gemini only if you exceed 1M token context

Reduce Context

  • Clear chat regularly
  • Use focused @mentions
  • Exclude irrelevant files
  • Summarize long discussions

Reuse Context

  • Save useful prompts
  • Create project rules
  • Build prompt templates
  • Use memory feature
# EXPENSIVE: Multiple Opus 4 calls
"Refactor the auth service" (Opus 4)
"Now refactor the user service" (Opus 4)
"Now refactor the profile service" (Opus 4)
# EFFICIENT: Single comprehensive call
"Refactor auth, user, and profile services to follow
our new architecture pattern. Provide implementation
plan first, then execute." (Opus 4 once)
  1. Exploration Phase (Sonnet 4.5)

    • Understand the problem
    • Gather context
    • Initial attempts
  2. Planning Phase (Opus 4)

    • Architecture design
    • Break down complex tasks
    • Create implementation plan
  3. Implementation Phase (Sonnet 4.5)

    • Execute the plan
    • Write code
    • Create tests
  4. Debug Phase (o3 if needed)

    • Solve complex issues
    • Optimize algorithms
    • Fix edge cases
Task: Add user notifications
Models Used:
- Sonnet 4.5: Initial implementation (90%)
- Opus 4: System design (10%)
Total Cost: ~$5
Time Saved: 4 hours
Task: Fix memory leak in production
Models Used:
- Sonnet 4.5: Initial investigation (20%)
- o3: Deep analysis and fix (80%)
Total Cost: ~$15
Time Saved: 8 hours debugging
Task: Migrate to new framework
Models Used:
- Opus 4: Planning (20%)
- Gemini 2.5: Analysis (30%)
- Sonnet 4.5: Implementation (50%)
Total Cost: ~$40
Time Saved: 20 hours
Opus 4: "Create a detailed plan for implementing OAuth"
↓ (Save plan to file)
Sonnet 4.5: "Implement step 1 from oauth-plan.md"
Sonnet 4.5: "Implement step 2 from oauth-plan.md"

Open multiple Cursor instances:

  • Instance 1: Opus 4 for architecture
  • Instance 2: Sonnet 4.5 for implementation
  • Instance 3: o3 for testing edge cases
- Direct and specific
- Include code examples
- Reference file paths
- Clear success criteria
  1. Check usage: Settings → Usage
  2. Set budget alerts
  3. Review weekly patterns
  4. Optimize based on data
  • High Opus 4 usage: Consider better planning
  • Repeated similar tasks: Create rules/templates
  • Long conversations: Clear context more often
  • Failed attempts: Switch models earlier

Before starting a task, ask:

  • Can Sonnet 4.5 handle this? (Yes, 90%+ of the time!)
  • Is this a bug fix or UI work? (Consider gpt-5-codex)
  • Do I need > 1M tokens? (Consider Gemini 2.5 Pro)
  • Am I using the right prompting style?
  • Is the model working well or should I switch?

Continue to Project Rules

Now let’s set up project rules to ensure consistent AI behavior across all models.

Project Rules →

Time: 10 minutes