# CleverAgents Model Configuration
# This file centralizes model assignments and tier definitions

models:
  # Model tier definitions
  tiers:
    haiku:
      id: anthropic/claude-haiku-4-5
      max_tokens: 200000
      use_for: simple_tasks
      cost_rank: 1  # Lowest cost
      
    codex:
      id: openai/gpt-5-codex
      max_tokens: 200000
      use_for: implementation
      cost_rank: 2
      
    sonnet:
      id: anthropic/claude-sonnet-4-6
      max_tokens: 200000
      use_for: complex_reasoning
      cost_rank: 3
      
    opus:
      id: anthropic/claude-opus-4-6
      max_tokens: 200000
      use_for: critical_decisions
      cost_rank: 4  # Highest cost

  # Agent-specific model assignments
  assignments:
    # Implementation agents
    implementer: codex  # Core implementer inherits model from tier
    implementation-worker: codex
    implementation-pool-supervisor: sonnet  # Needs good planning
    
    # Testing agents
    behave-tester: codex  # Core tester inherits model from tier
    robot-tester: codex
    test-fixer: codex
    unit-test-runner: codex
    integration-test-runner: codex
    coverage-improver: codex
    
    # Review agents
    pr-reviewer: sonnet  # Needs nuanced judgment
    implementation-reviewer: sonnet
    pr-review-pool-supervisor: sonnet
    
    # Architecture & Planning
    architecture-pool-supervisor: sonnet  # Architecture decisions
    architecture-guard-pool-supervisor: sonnet  # Enforces architectural coherence (uses gemini-2.5-pro at runtime)
    epic-planning-pool-supervisor: sonnet  # Complex planning
    milestone-reviewer: sonnet
    
    # System agents
    system-watchdog-pool-supervisor: sonnet  # Critical system health monitoring
    human-liaison-pool-supervisor: sonnet  # Nuanced human interaction
    product-builder: sonnet  # Overall orchestration
    product-verifier: sonnet
    
    # Utility agents
    ref-reader: haiku  # Simple document reading (uses gemini-2.5-pro at runtime)
    spec-reader: haiku  # (uses gemini-2.5-pro at runtime)
    issue-finder: haiku
    issue-analyzer: haiku
    pr-status-analyzer: codex
    
    # Specialized agents
    agent-evolution-pool-supervisor: sonnet  # Modifies other agents
    spec-update-pool-supervisor: sonnet  # Updates architecture docs
    timeline-update-pool-supervisor: sonnet
    documentation-pool-supervisor: sonnet
    backlog-grooming-pool-supervisor: sonnet
    project-owner-pool-supervisor: sonnet  # Strategic decisions
    
    # Quality agents
    lint-fixer: codex
    typecheck-fixer: codex
    quality-enforcer: sonnet
    
    # Infrastructure
    bug-hunt-pool-supervisor: sonnet  # Needs deep analysis (uses gemini-2.5-pro at runtime)
    uat-test-pool-supervisor: sonnet  # User perspective testing
    test-infra-pool-supervisor: sonnet  # (uses gemini-2.5-pro at runtime)
    
  # Escalation paths
  escalation:
    # Implementation escalation
    implementation_path:
      - haiku    # First attempt (if simple)
      - codex    # Standard implementation
      - sonnet   # Complex problems
      - opus     # Critical failures
      
    # Testing escalation  
    testing_path:
      - codex    # Standard tests
      - sonnet   # Complex test scenarios
      - opus     # Critical test design
      
    # Review escalation
    review_path:
      - sonnet   # Standard review
      - opus     # Critical review decisions