# Continuity ledger (per-branch)

## Human intent (must not be overwritten)

- Add support for `anthropic/claude-sonnet-4.6` model (GitHub issue #2754)
- Use the add-model skill for consistent integration

## Goal (incl. success criteria)

- Register `anthropic/claude-sonnet-4.6` across all required files in the codebase
- All validation checks pass: format, build-sdk, check-types, tidy, test

## Constraints/Assumptions

- Pricing: $3.00/M input, $15.00/M output (consistent across all sources)
- 1M context window, released 02/17/2026
- Same configuration options as other Anthropic models (temperature + thinking)
- Source of truth: Anthropic official docs (https://platform.claude.com/docs/en/about-claude/models/overview)

## Key decisions

- Used same capabilities as other Anthropic models: TextGeneration, Reasoning, PdfFileInput, ImageFileInput
- Set maxOutputTokens to 64,000 (per Anthropic official docs; 128K is Opus 4.6 only)
- Set knowledgeCutoff to Aug 2025 (per Anthropic official docs; differs from Opus 4.6's May 2025)
- requiredTier: "pro"

## State

- In review — fixes applied, pending commit and push

## Done

- Added model to language-model-registry/src/anthropic.ts
- Added enum, regex catch, and instance to language-model/src/anthropic.ts
- Added pricing to language-model/src/costs/model-prices.ts
- Added AI SDK transformation case
- Added bidirectional node conversion mappings
- All validation checks passed (format, build-sdk, check-types, tidy, test)
- PR #2836 opened and reviewed by automated bots (CodeRabbit, Copilot, Qodo, Cursor Bugbot)
- Added unit tests for claude-sonnet-4.6 and claude-opus-4.6 parsing (anthropic.test.ts)
- Fixed maxOutputTokens: 128K → 64K (Anthropic official docs confirm 64K for Sonnet 4.6)
- Fixed knowledgeCutoff: May 2025 → Aug 2025 (Anthropic official docs)

## Now

- Commit fixes and push to PR

## Next

- Re-run validation checks, address any remaining review feedback, merge

## Open questions (UNCONFIRMED if needed)

- CodeRabbit suggested updating `claude-4-sonnet-*` fallback to 4.6, but this is a legacy pattern — keeping as-is (maps to 4.5)

## Review findings (PR #2836)

- **maxOutputTokens**: Vercel AI Gateway and Google Vertex AI both reported 128K, but Anthropic official docs and Amazon Bedrock (defers to Anthropic) confirm **64K** for Sonnet 4.6. 128K is Opus 4.6 only. Cursor Bugbot was correct. Fixed.
- **knowledgeCutoff**: Original code used May 2025 (copied from Opus 4.6), but Anthropic official docs show **Aug 2025** for Sonnet 4.6. Fixed.
- **Missing tests**: Added unit tests for claude-sonnet-4.6 and claude-opus-4.6 parsing and fallback variants to anthropic.test.ts. Fixed.

## Working set (files/ids/commands)

- packages/language-model-registry/src/anthropic.ts
- packages/language-model/src/anthropic.ts
- packages/language-model/src/anthropic.test.ts
- packages/language-model/src/costs/model-prices.ts
- packages/giselle/src/generations/v2/language-model/transform-giselle-to-ai-sdk.ts
- packages/node-registry/src/node-conversion.ts
- packages/node-registry/src/node-conversion.test.ts
