Skip to content

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.

ModelRoleUse CaseContext
claude-opus-4-20250514OrchestratorComplex writing, decisions200K
claude-sonnet-4-20250514WorkerChapter writing, analysis200K
claude-3-5-haiku-20241022HelperQuick fixes, formatting200K

Model Selection by Task

TaskModelRationale
OrchestrationOpusComplex context handling
Complex chaptersOpusDeep synthesis needed
Standard chaptersSonnetFast, high quality
Source analysisSonnetEfficient parallel reading
Code examplesSonnetTechnical precision
BibliographySonnetPattern-based work
Quick fixesHaikuSimple, fast tasks
Final reviewOpusComprehensive evaluation

OpenAI (GPT-4)

Alternative models from OpenAI available via OpenCode.

ModelUse CaseContext
gpt-4-turboComplex writing128K
gpt-4oGeneral tasks128K
gpt-4o-miniQuick tasks128K

Task-Model Mapping

Detailed Recommendations

TaskPrimaryAlternative
Main orchestrationClaude Opus-
Complex chapterClaude OpusGPT-4 Turbo
Research synthesisClaude OpusGPT-4o
Standard chapterClaude SonnetGPT-4o
Code examplesClaude SonnetGPT-4o
ReviewClaude SonnetGPT-4o
Quick fixesClaude HaikuGPT-4o-mini

Language Quality

Multi-Language Support

ModelAccentsProseOverall
Claude OpusExcellentExcellentBest
Claude SonnetExcellentVery GoodGreat
GPT-4 TurboGoodGoodGood
GPT-4oGoodGoodGood

TIP

Claude models provide excellent multi-language support with proper formatting and natural prose style.


Cost Estimation

Example: 100-page document

ModelInput TokensOutput TokensEstimated 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"

Multi-Agent Documentation Generation System