Model Selection Matrix
Guidelines for choosing the right Claude model for each persona type. Cost and quality trade-offs vary by task complexity and organizational risk tolerance.
Model Comparisonβ
| Model | Speed | Cost | Best For |
|---|---|---|---|
| Haiku 4.5 | Fastest | ~$0.001/1K tokens | Linting, simple checks, high-volume tasks |
| Sonnet 4.6 | Fast | ~$0.003/1K tokens | Code review, test generation, most personas |
| Opus 4.6 | Moderate | ~$0.015/1K tokens | Security review, architecture, complex reasoning |
Persona Recommendationsβ
| Persona | Recommended Model | Rationale |
|---|---|---|
| Code Reviewer | Sonnet | Good balance of speed and quality for PR review |
| Security Reviewer | Opus | Security findings require deep reasoning; false negatives are costly |
| Test Generator | Sonnet | Test generation is pattern-heavy; Sonnet handles well |
| Test Data Expert | Haiku or Sonnet | Data generation is mostly structural; Haiku is cost-effective |
Configurationβ
Set model per persona in persona.config.json:
{
"model": "sonnet"
}
Set a per-persona model in the persona's persona.config.json:
{ "model": "opus" }
The compiler writes this into the generated .claude/agents/{persona}.md frontmatter on every
build β that file is generated output, so don't hand-edit it (edits are overwritten). For
team-scoped overrides, use the scope hierarchy.
Decision Criteriaβ
Use Haiku when:β
- The task is deterministic or low-stakes (linting, formatting, data scaffolding)
- Volume is high (running on every commit, every file)
- Latency matters more than depth (real-time suggestions, autocomplete)
- Budget is constrained and accuracy requirements are moderate
Use Sonnet when:β
- The task requires understanding code semantics (code review, test writing)
- Findings need to be actionable and specific (not just pattern matching)
- The persona runs on PRs or at moderate frequency
- You need a good balance of cost and quality (default for most orgs)
Use Opus when:β
- The task has high stakes (security review, compliance, architecture decisions)
- False negatives are expensive (missed vulnerabilities, incorrect approvals)
- The persona runs infrequently (weekly audits, release gates)
- Depth of reasoning matters more than speed
Cost Estimationβ
For a team of 10 developers with ~5 PRs/day each:
| Persona | Model | Invocations/day | Est. daily cost |
|---|---|---|---|
| Code Reviewer | Sonnet | 50 | ~$3.00 |
| Security Reviewer | Opus | 10 | ~$3.00 |
| Test Generator | Sonnet | 20 | ~$1.20 |
| Test Data Expert | Haiku | 10 | ~$0.10 |
| Total | 90 | ~$7.30/day |
Monthly estimate: ~$165 for the four personas in this example across a 10-person team.
(The stock set also includes a fifth persona, AI Security Reviewer β add a row for it
if your org enables /review-ai-security.)
Use agentboot cost-estimate for projections based on your actual config.
Escalation Patternβ
Some orgs use a two-tier approach:
- Fast pass (Haiku/Sonnet): Run on every PR for quick feedback
- Deep pass (Opus): Run on PRs touching security-sensitive paths or before release
Configure this via scope hierarchy β set model: "opus" at the team level for
security-sensitive repos while keeping model: "sonnet" as the org default.