Add a fourth model profile preset that assigns models by agent role: opus for planning and debugging (reasoning-critical), sonnet for execution and research (follows instructions), haiku for mapping and checking (high volume, structured output). This gives solo developers on paid API tiers a cost-effective middle ground — quality where it matters most (planning) without overspending on mechanical tasks (mapping, checking). Per-agent overrides via model_overrides continue to take precedence over any profile preset, including adaptive. Closes #1713 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
1.3 KiB
Markdown
39 lines
1.3 KiB
Markdown
# Model Profile Resolution
|
|
|
|
Resolve model profile once at the start of orchestration, then use it for all Task spawns.
|
|
|
|
## Resolution Pattern
|
|
|
|
```bash
|
|
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
```
|
|
|
|
Default: `balanced` if not set or config missing.
|
|
|
|
## Lookup Table
|
|
|
|
@~/.claude/get-shit-done/references/model-profiles.md
|
|
|
|
Look up the agent in the table for the resolved profile. Pass the model parameter to Task calls:
|
|
|
|
```
|
|
Task(
|
|
prompt="...",
|
|
subagent_type="gsd-planner",
|
|
model="{resolved_model}" # "inherit", "sonnet", or "haiku"
|
|
)
|
|
```
|
|
|
|
**Note:** Opus-tier agents resolve to `"inherit"` (not `"opus"`). This causes the agent to use the parent session's model, avoiding conflicts with organization policies that may block specific opus versions.
|
|
|
|
If `model_profile` is `"adaptive"`, agents resolve to role-based assignments (opus/sonnet/haiku based on agent type).
|
|
|
|
If `model_profile` is `"inherit"`, all agents resolve to `"inherit"` (useful for OpenCode `/model`).
|
|
|
|
## Usage
|
|
|
|
1. Resolve once at orchestration start
|
|
2. Store the profile value
|
|
3. Look up each agent's model from the table when spawning
|
|
4. Pass model parameter to each Task call (values: `"inherit"`, `"sonnet"`, `"haiku"`)
|