Skip to main content

Model Selection

hatch3r lets you configure preferred AI models for your agents. You can set a global default, override per agent, or use project-specific customization files.

Overview

When you configure a model, hatch3r includes it in the generated config for each tool (Cursor, Copilot, Claude Code, etc.). Some platforms support native model selection in their config; others receive the recommendation as guidance text. Either way, the preference is preserved across npx hatch3r sync runs.

When no model is configured at any level, hatch3r does not emit a model preference. Each platform uses its own default.

Configuration Points

SourcePathPrecedence
Customization YAML.hatch3r/agents/{agent-id}.customize.yamlHighest
Manifest per-agenthatch.json -> models.agents.{agent-id}2nd
Canonical agent.agents/agents/{agent-id}.md frontmatter model:3rd
Manifest defaulthatch.json -> models.default4th
(none)--Platform auto-select

Resolution Order

  1. Customization file -- .hatch3r/agents/{agent-id}.customize.yaml with a model field wins
  2. Manifest per-agent -- hatch.json -> models.agents[agent-id]
  3. Canonical agent frontmatter -- model: in .agents/agents/{agent-id}.md
  4. Manifest default -- hatch.json -> models.default
  5. No model -- platform uses its own default

Aliases

Use short aliases instead of full model IDs. hatch3r resolves them before emitting.

AliasResolves To
opusclaude-opus-4-6
sonnetclaude-sonnet-4-6
haikuclaude-haiku-4-5
codexgpt-5.3-codex
codex-prevgpt-5.2-codex
codex-minigpt-5.1-codex-mini
codex-sparkgpt-5.3-codex-spark
gemini-progemini-3.1-pro
gemini-flashgemini-3-flash
gemini-stablegemini-2.5-pro

Unknown values are passed through as-is.

Examples

hatch.json

{
"models": {
"default": "opus",
"agents": {
"hatch3r-lint-fixer": "sonnet",
"hatch3r-test-writer": "gemini-pro"
}
}
}

Canonical agent frontmatter

In .agents/agents/hatch3r-implementer.md:

---
id: hatch3r-implementer
description: Focused implementation agent for a single issue.
model: opus
---

Customization YAML

In .hatch3r/agents/hatch3r-reviewer.customize.yaml:

agent: hatch3r-reviewer
model: codex

Built-in Agent Defaults

Some agents ship with a default model in their canonical frontmatter. These defaults are tuned for the agent's cognitive profile.

AgentDefaultRationale
hatch3r-lint-fixerhaikuMechanical pattern fixes; speed and low cost
hatch3r-ci-watcherhaikuLog parsing and pattern recognition; fast feedback
hatch3r-docs-writersonnetWriting quality and technical accuracy
hatch3r-dependency-auditorsonnetStructured CVE/freshness analysis
hatch3r-a11y-auditorsonnetWCAG standard interpretation
hatch3r-test-writersonnetEdge-case identification and test design

Agents without a default (hatch3r-implementer, hatch3r-researcher, hatch3r-reviewer, hatch3r-security-auditor, hatch3r-perf-profiler) use the platform's own default.

Override at any higher precedence level:

{
"models": {
"agents": {
"hatch3r-lint-fixer": "sonnet"
}
}
}

Cross-Platform Override

Built-in defaults resolve to Anthropic model IDs. On platforms that only support their own models (Codex CLI, Gemini CLI), set a project-wide override:

{
"models": {
"default": "codex",
"agents": {
"hatch3r-lint-fixer": "codex-spark",
"hatch3r-ci-watcher": "codex-spark"
}
}
}

Platform Behavior

PlatformNative config?When model is set
CursorYesmodel: in agent YAML frontmatter
CopilotYes (VS Code)model: in agent YAML; ignored on github.com
OpenCodeYesmodel: provider/id in agent config
CodexYesmodel = "id" in TOML
Claude CodeNoGuidance: /model command and env var
Cline/RooNoGuidance in role definition
GeminiNoGuidance in GEMINI.md
WindsurfNoGuidance in .windsurfrules
AmpNoGuidance in .amp/AGENTS.md
  • Native config -- the tool can apply the model directly
  • Guidance -- the model is included as instructional text; users set it manually