Developer Onboarding
Core Practices

Model Selection Strategy

Choose the right AI model for each task - balancing capability, speed, and cost in your daily workflow

Why Model Selection Matters

Not all AI tasks need the most powerful model. Using Claude Opus 4.5 for everything is like driving a Ferrari to the grocery store - expensive and overkill.

This guide helps you:

  • Save token costs (30-70% reduction typical)
  • Get faster responses for simple tasks
  • Use deep reasoning only when it adds value
  • Build sustainable AI-assisted workflows

Model Overview (December 2025)

ModelStrengthsBest ForRelative Cost
Claude Opus 4.5Deep reasoning, complex architecture, nuanced understandingArchitecture decisions, security audits, complex debugging$$$ (3x)
Claude Sonnet 4.5Balanced capability/speed, excellent code generationDay-to-day development, feature implementation, refactoring$$ (1x baseline)
Gemini 3 ProFast, massive context window, good with large codebasesMulti-file analysis, documentation, exploratory work$$ (0.8x)
GPT-5Lightweight, very fast, cost-effectiveRoutine tasks, boilerplate, simple fixes, bulk operations$ (0.3x)

Cost baseline: Sonnet 4.5 = 1x (reference point). Other models shown relative to Sonnet.

Task-to-Model Decision Matrix

Use Claude Opus 4.5 When

Deep reasoning required:

✅ Architecture decisions
   "Compare event-driven vs REST architecture for notification system
    considering: scale, team size, budget, failure modes"
   → Needs multi-dimensional analysis

✅ Security audits
   "Review authentication flow for OWASP Top 10 vulnerabilities
    considering: session management, token handling, rate limiting"
   → Needs security expertise and thorough analysis

✅ Complex debugging
   "Race condition in payment processing - works 95% of time
    Payment sometimes charged twice, logs show:
    [paste complex multi-service logs]"
   → Needs deep reasoning across multiple systems

✅ Nuanced refactoring
   "Refactor legacy authentication system to support SSO
    without breaking existing users, sessions, or API keys"
   → Needs careful understanding of constraints

Cost consideration: Opus is 3x more expensive. Use only when Sonnet struggles or task truly needs deep reasoning.

Use Claude Sonnet 4.5 When (Default Choice)

Most development work:

✅ Feature implementation
   "Implement user preferences system:
    - Save/load from database
    - Dark mode, notifications, language
    - Follow patterns from @UserService"
   → Standard development, Sonnet excels here

✅ Code review and refactoring
   "Review @PaymentService.ts for:
    - Error handling completeness
    - Performance issues
    - Security concerns"
   → Sonnet handles this well

✅ Test generation
   "Generate unit tests for @OrderService.ts
    - Cover edge cases: empty cart, discounts, international
    - Follow patterns from @UserService.test.ts"
   → Sonnet is excellent at test generation

✅ Bug fixing (standard complexity)
   "Button click handler not firing on mobile
    Code: @components/Button.tsx
    Error: [paste error]"
   → Sonnet handles most bugs efficiently

Why Sonnet is the default: Best balance of capability, speed, and cost for 80% of development work.

Use Gemini 3 Pro When

Large context and exploration:

✅ Large codebase analysis
   "Analyze entire @src/ directory
    Map out authentication flow across all files"
   → Gemini's massive context window shines

✅ Documentation generation
   "Generate API documentation for all endpoints in @src/api/
    Include: request/response schemas, auth requirements, examples"
   → Handles many files efficiently

✅ Quick exploratory questions
   "Where in the codebase do we handle user permissions?"
   "Show me all files that import @UserService"
   → Fast responses for exploration

✅ Multi-file refactoring coordination
   "Rename getUserData to fetchUserProfile across entire codebase
    Update all imports and references"
   → Excellent at tracking changes across many files

When to prefer Gemini over Sonnet: Working with 10+ files simultaneously, need fast context switching, or doing exploratory analysis.

Use GPT-5 When

Routine and repetitive tasks:

✅ Simple boilerplate
   "Generate CRUD endpoints for Product model
    Fields: name, price, description, category"
   → Straightforward, no complexity

✅ Code formatting and cleanup
   "Add JSDoc comments to all public methods in @src/utils/"
   → Repetitive, doesn't need reasoning

✅ Bulk operations
   "Add TypeScript types to all 20 files in @src/legacy/"
   → Cost-sensitive bulk work

✅ Simple bug fixes
   "Fix typo in variable name: user_nam → user_name across project"
   "Add missing semicolons in @src/old-code/"
   → Mechanical fixes, no reasoning needed

✅ Quick syntax questions
   "What's the TypeScript syntax for optional chaining?"
   "Show me example of async/await error handling"
   → Fast answers to simple questions

Why GPT-5: 70% cheaper than Sonnet, very fast, perfect for tasks that don't need deep reasoning.

Model Selection by Cursor Mode

Chat Mode

Quick questions and exploration:

Use GPT-5 or Gemini:
- "Where is authentication handled?"
- "Show me example of our error handling pattern"
- "What's the database schema for users table?"

Switch to Sonnet:
- "Review this code for issues: @Component.tsx"
- "Explain the architecture of @auth/ module"

Switch to Opus:
- "Analyze security implications of this authentication flow"
- "What could go wrong with this database migration?"

Rule: Start with cheaper models for questions. Escalate to Sonnet/Opus if answer needs depth.

Composer Mode

Multi-file feature implementation:

Default to Sonnet:
- "Implement user profile editing feature"
- "Add email notifications system"
- "Refactor payment processing"

Use GPT-5 for simple scaffolding:
- "Create new React component: UserCard with props..."
- "Generate boilerplate for new API route /api/products"

Use Opus for complex features:
- "Implement OAuth2 flow with PKCE"
- "Add real-time collaboration with conflict resolution"

Rule: Sonnet is the sweet spot for Composer. Use GPT-5 only for simple scaffolding, Opus only for genuinely complex features.

Agent Mode

Autonomous task execution:

Use Sonnet (most common):
- "Add tests to all services in @src/services/"
- "Refactor @legacy/ to use new error handling"
- "Update all API endpoints to include rate limiting"

Use GPT-5 for simple automation:
- "Add logging to all API endpoints"
- "Generate README files for each module"
- "Add TypeScript strict mode fixes"

Use Opus for complex autonomous work:
- "Audit entire codebase for security issues and fix them"
- "Migrate authentication from sessions to JWT (safe migration)"

Rule: Agent mode burns tokens fast. Start with Sonnet. Use GPT-5 for truly mechanical tasks. Reserve Opus for when agent needs to make complex decisions.

Practical Workflow Patterns

Pattern 1: Start Cheap, Escalate When Stuck

Step 1: Try Sonnet (or GPT-5 for simple tasks)
Step 2: If answer is shallow or wrong → switch to Opus
Step 3: Once you understand the problem → back to Sonnet for implementation

Example:
You: [using Sonnet] "Debug this race condition in checkout"
Sonnet: "Try adding a mutex here..."
You: [try it, doesn't work]
You: [switch to Opus] "Previous attempt failed. Deep analysis needed."
Opus: "Root cause is distributed transaction across microservices..."
You: [now understand the issue]
You: [switch to Sonnet] "Implement saga pattern for checkout as discussed"

Time/cost savings: Don't start with Opus. Let cheaper models attempt first.

Pattern 2: Batch Simple Tasks to Save Cost

Instead of:
- Chat 1 with Sonnet: "Add type to function A"
- Chat 2 with Sonnet: "Add type to function B"
- Chat 3 with Sonnet: "Add type to function C"

Do this:
- Agent with GPT-5: "Add TypeScript types to all functions in @src/utils/"

Savings: 50-70% token cost for bulk mechanical work

Pattern 3: Use Right Model for Each Phase

Phase 1: Research (Opus)
"Analyze approaches for implementing real-time features
considering: WebSockets, SSE, polling, WebRTC"

Phase 2: Planning (Sonnet)
"Based on WebSocket approach, create implementation plan:
- File structure
- API changes
- Testing strategy"

Phase 3: Implementation (Sonnet or GPT-5)
"Implement WebSocket connection manager following the plan"

Phase 4: Edge cases (Opus if needed)
"Review for race conditions, memory leaks, reconnection logic"

Why this works: Deep thinking where needed, efficient implementation with mid-tier models, verification with deep reasoning.

Common Model Selection Mistakes

Mistake 1: Using Opus for Everything

❌ "Generate a button component" with Opus
   Cost: $$$
   Speed: Slow
   Benefit: None (Sonnet/GPT-5 just as good)

✅ "Generate a button component" with GPT-5
   Cost: $
   Speed: Fast
   Benefit: Same quality, 1/10th the cost

Reality check: Most developers overuse Opus out of habit, not necessity.

Mistake 2: Using GPT-5 for Complex Work

❌ "Design our microservices architecture" with GPT-5
   Result: Shallow analysis, misses important trade-offs

✅ "Design our microservices architecture" with Opus
   Result: Thorough analysis of failure modes, scaling, costs

Rule: Don't penny-pinch on important decisions.

Mistake 3: Not Switching Models Mid-Task

Stuck pattern:
You: [using Sonnet] "Debug this memory leak"
Sonnet: [suggests common fixes]
You: [tries them, all fail]
You: [asks Sonnet again, gets similar answers]
You: [wastes 30 minutes]

Better pattern:
You: [using Sonnet] "Debug this memory leak"
Sonnet: [suggests common fixes]
You: [tries them, fail]
You: [switches to Opus] "Standard fixes didn't work. Deep analysis:"
Opus: [identifies subtle closure issue]

Lesson: If stuck after 2-3 attempts, escalate to more powerful model.

Mistake 4: Wrong Model for Codebase Size

❌ Using Sonnet to analyze 50+ files simultaneously
   → Context gets crowded, misses connections

✅ Using Gemini to analyze 50+ files
   → Handles large context better

❌ Using Gemini for deep architectural decision
   → Fast but may miss nuances

✅ Using Opus for deep architectural decision
   → Thorough analysis worth the cost

Cost Optimization Guidelines

Monthly Budget Approach

If you use Cursor heavily (~160 hours/month):

Recommended model split:
- 60% Sonnet (day-to-day development)
- 25% GPT-5 (routine/mechanical tasks)
- 10% Gemini (large context work)
- 5% Opus (critical decisions only)

Expected cost: ~$150-200/month

vs All Opus approach:
Expected cost: ~$500-600/month

Savings: 60-70% with minimal quality loss

When Cost Doesn't Matter

Use Opus freely if:

  • Client project (cost is passed through)
  • Critical production issue (speed > cost)
  • Learning/exploration (investment in knowledge)
  • Architecture decisions (one-time, high-impact)

Use cheapest model if:

  • Personal projects on tight budget
  • Bulk operations (40+ files to process)
  • Experimental/throwaway code
  • Learning basic syntax

Quick Reference: Task → Model

Task TypeFirst TryIf StuckWhy
New featureSonnetOpusSonnet handles 90%
Simple bugSonnet-Usually straightforward
Complex bugSonnetOpusEscalate if needed
ArchitectureOpus-Worth the deep analysis
BoilerplateGPT-5-No reasoning needed
Test generationSonnet-Sonnet excels here
Code reviewSonnetOpusOpus for security review
DocumentationGemini-Good with many files
RefactoringSonnetOpusOpus for risky refactors
Learning/explorationGPT-5 or GeminiSonnetFast answers first

Bottom line: Sonnet is your workhorse. GPT-5 for simple stuff. Opus for when you need the big guns. Gemini for large context. Match the model to the task, not the other way around.