Commit 680f5fa
authored
fix(agent): support Sonnet 5 output limits (#212)
## Why
Claude Sonnet 5 was added to the product catalog while
`@ai-sdk/anthropic` remained on 3.0.84, which does not recognize that
model ID. The provider therefore applied its unknown-model 4,096-token
compatibility limit. Sonnet 5 defaults to adaptive thinking, so long
structured tool calls could be truncated before required fields such as
file content were emitted.
## Decision
Upgrade only `@ai-sdk/anthropic` within its existing 3.x major to
3.0.107. This version recognizes `claude-sonnet-5`, uses its documented
128K output capability, forwards current thinking controls, and remains
compatible with the existing AI SDK 6 and Mastra 1 stack. No retry,
prompt, schema, or runtime workaround is introduced.
## Architecture and migration effects
- No architecture boundary changes
- No database or migration changes
- Lockfile-only transitive updates under the Anthropic provider
## Verification
- `pnpm lint`
- `pnpm typecheck`
- `pnpm turbo build --force`
- `pnpm deadcode`
- `pnpm architecture:check`
- `pnpm turbo skills:build`
- Focused typechecks for `@cheatcode/agent-core` and
`@cheatcode/agent-worker`
- Captured the generated Sonnet 5 request with a mock transport and
verified `model: claude-sonnet-5` and `max_tokens: 128000`
Production flow QA will follow deployment.1 parent 2ad76c6 commit 680f5fa
2 files changed
Lines changed: 37 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments