Skip to content

feat(model-overlays): add sonnet-5 overlay + resolver mapping#2247

Open
chrisquorum wants to merge 1 commit into
garrytan:mainfrom
chrisquorum:feat/sonnet-5-overlay
Open

feat(model-overlays): add sonnet-5 overlay + resolver mapping#2247
chrisquorum wants to merge 1 commit into
garrytan:mainfrom
chrisquorum:feat/sonnet-5-overlay

Conversation

@chrisquorum

Copy link
Copy Markdown

What

Claude Sonnet 5 (claude-sonnet-5) is the current Sonnet-tier flagship — near-Opus
quality on coding and agentic work. Today claude-sonnet-5* resolves through
models.ts to the generic claude overlay. This adds a dedicated sonnet-5
overlay so it inherits the claude base plus Sonnet-5 family nudges.

Changes

  • model-overlays/sonnet-5.md (new) — {{INHERIT:claude}} + three nudges: literal
    instruction following (state scope explicitly), scope work to the request (raise
    effort rather than prompting around shallow reasoning at low effort), and
    verbosity that tracks task complexity.
  • scripts/models.ts — add sonnet-5 to ALL_MODEL_NAMES and a resolveModel
    mapping (/^claude-sonnet-5(-|$)/ → sonnet-5), placed before the generic claude
    fallback. claude-sonnet-4-6 still falls through to generic claude.
  • test/model-overlay-sonnet-5.test.ts (new) — gate-tier test mirroring the
    opus-4-* overlay tests.

Notes

  • Nudges are drawn from documented Sonnet 5 behavioral shifts (literal instruction
    following, effort-scoped work, complexity-tracked verbosity), kept to the short
    form the other overlays use. Retune as more patterns emerge.

Validation

  • resolveModel('claude-sonnet-5') / 'claude-sonnet-5-sol'sonnet-5;
    claude-sonnet-4-6claude, claude-opus-4-7, and bare claude unchanged.
  • bun test test/model-overlay-sonnet-5.test.ts → all pass.
  • bun run gen:skill-docs → no generated-doc churn (only the three files above).
  • bun run typecheck → no new errors in the changed files.

Give claude-sonnet-5 a dedicated overlay instead of the generic claude
fallback: inherits the claude base plus Sonnet-5 family nudges (literal
instructions, scope-to-request, complexity-tracked verbosity). Adds the
models.ts resolver mapping and a gate-tier test mirroring the opus overlays.
@trunk-io

trunk-io Bot commented Jul 12, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant