AI Models
Model comparison and selection guide for the documentation generation system.
Model Hierarchy
Anthropic (Claude)
The primary model family for this documentation system. Anthropic provides the Claude model family via Claude.ai and the Anthropic API.
| Model | Role | Use Case | Context |
|---|---|---|---|
claude-opus-4-20250514 | Orchestrator | Complex writing, decisions | 200K |
claude-sonnet-4-20250514 | Worker | Chapter writing, analysis | 200K |
claude-3-5-haiku-20241022 | Helper | Quick fixes, formatting | 200K |
Model Selection by Task
| Task | Model | Rationale |
|---|---|---|
| Orchestration | Opus | Complex context handling |
| Complex chapters | Opus | Deep synthesis needed |
| Standard chapters | Sonnet | Fast, high quality |
| Source analysis | Sonnet | Efficient parallel reading |
| Code examples | Sonnet | Technical precision |
| Bibliography | Sonnet | Pattern-based work |
| Quick fixes | Haiku | Simple, fast tasks |
| Final review | Opus | Comprehensive evaluation |
OpenAI (GPT-4)
Alternative models from OpenAI available via OpenCode.
| Model | Use Case | Context |
|---|---|---|
gpt-4-turbo | Complex writing | 128K |
gpt-4o | General tasks | 128K |
gpt-4o-mini | Quick tasks | 128K |
Task-Model Mapping
Detailed Recommendations
| Task | Primary | Alternative |
|---|---|---|
| Main orchestration | Claude Opus | - |
| Complex chapter | Claude Opus | GPT-4 Turbo |
| Research synthesis | Claude Opus | GPT-4o |
| Standard chapter | Claude Sonnet | GPT-4o |
| Code examples | Claude Sonnet | GPT-4o |
| Review | Claude Sonnet | GPT-4o |
| Quick fixes | Claude Haiku | GPT-4o-mini |
Language Quality
Multi-Language Support
| Model | Accents | Prose | Overall |
|---|---|---|---|
| Claude Opus | Excellent | Excellent | Best |
| Claude Sonnet | Excellent | Very Good | Great |
| GPT-4 Turbo | Good | Good | Good |
| GPT-4o | Good | Good | Good |
TIP
Claude models provide excellent multi-language support with proper formatting and natural prose style.
Cost Estimation
Example: 100-page document
| Model | Input Tokens | Output Tokens | Estimated Cost |
|---|---|---|---|
| Claude Opus | ~200K | ~100K | ~$30-50 |
| Claude Sonnet | ~200K | ~100K | ~$10-15 |
| GPT-4 Turbo | ~200K | ~100K | ~$25-40 |
Cost Optimization Strategy
Recommendations:
- Use Opus only for orchestration and complex chapters
- Use Sonnet for bulk chapter writing
- Use Haiku for formatting and simple corrections
Configuration
Claude Code
The orchestrator automatically selects models based on task complexity.
OpenCode
Configure task-specific models in .opencode/config.yaml:
yaml
task_models:
chapter_writing:
provider: "anthropic"
model: "claude-opus-4-20250514"
standard_writing:
provider: "anthropic"
model: "claude-sonnet-4-20250514"
quick_tasks:
provider: "anthropic"
model: "claude-3-5-haiku-20241022"