feat(provider): add Anthropic Sonnet 5.5
- commit
- 30477c42479173c66967397ab108cf8ecc4da84d
- author
- brice · · 2026-09-29 07:36 UTC
- parent
- ea0e112
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +18 -0
M packages/provider/models.go +5 -0
| @@ -323,6 +323,11 @@ var Catalog = []Model{ | |||
| 323 | 323 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |
| 324 | 324 | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | |
| 325 | 325 | }, | |
| 326 | + | { | |
| 327 | + | Provider: "anthropic", ID: "claude-sonnet-5-5", DisplayName: "Claude Sonnet 5.5", | |
| 328 | + | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |
| 329 | + | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | |
| 330 | + | }, | |
| 326 | 331 | { | |
| 327 | 332 | Provider: "anthropic", ID: "claude-fable-5", DisplayName: "Claude Fable 5", | |
| 328 | 333 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |
| @@ -323,6 +323,11 @@ var Catalog = []Model{ | |||||
| 323 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | 323 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | ||
| 324 | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | 324 | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | ||
| 325 | }, | 325 | }, | ||
| 326 | + | { | |||
| 327 | + | Provider: "anthropic", ID: "claude-sonnet-5-5", DisplayName: "Claude Sonnet 5.5", | |||
| 328 | + | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |||
| 329 | + | PriceInput: 2, PriceOutput: 10, PriceCacheRead: 0.2, PriceCacheWrite: 2.5, | |||
| 330 | + | }, | |||
| 326 | { | 331 | { | ||
| 327 | Provider: "anthropic", ID: "claude-fable-5", DisplayName: "Claude Fable 5", | 332 | Provider: "anthropic", ID: "claude-fable-5", DisplayName: "Claude Fable 5", | ||
| 328 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | 333 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | ||
M packages/provider/provider_test.go +13 -0
| @@ -593,6 +593,19 @@ func TestClaudeFable51Catalog(t *testing.T) { | |||
| 593 | 593 | } | |
| 594 | 594 | } | |
| 595 | 595 | ||
| 596 | + | func TestClaudeSonnet55Catalog(t *testing.T) { | |
| 597 | + | m, err := FindModel("anthropic", "claude-sonnet-5-5") | |
| 598 | + | if err != nil { | |
| 599 | + | t.Fatal(err) | |
| 600 | + | } | |
| 601 | + | if m.DisplayName != "Claude Sonnet 5.5" || m.ContextWindow != 1000000 || m.MaxOutput != 128000 || !m.Reasoning || !m.AdaptiveThinking || m.Speculative { | |
| 602 | + | t.Fatalf("unexpected Sonnet 5.5 model: %+v", m) | |
| 603 | + | } | |
| 604 | + | if m.PriceInput != 2 || m.PriceOutput != 10 || m.PriceCacheRead != 0.2 || m.PriceCacheWrite != 2.5 { | |
| 605 | + | t.Fatalf("unexpected Sonnet 5.5 pricing: %+v", m) | |
| 606 | + | } | |
| 607 | + | } | |
| 608 | + | ||
| 596 | 609 | func TestClaudeSonnet5Catalog(t *testing.T) { | |
| 597 | 610 | m, err := FindModel("anthropic", "claude-sonnet-5") | |
| 598 | 611 | if err != nil { | |
| @@ -593,6 +593,19 @@ func TestClaudeFable51Catalog(t *testing.T) { | |||||
| 593 | } | 593 | } | ||
| 594 | } | 594 | } | ||
| 595 | 595 | ||||
| 596 | + | func TestClaudeSonnet55Catalog(t *testing.T) { | |||
| 597 | + | m, err := FindModel("anthropic", "claude-sonnet-5-5") | |||
| 598 | + | if err != nil { | |||
| 599 | + | t.Fatal(err) | |||
| 600 | + | } | |||
| 601 | + | if m.DisplayName != "Claude Sonnet 5.5" || m.ContextWindow != 1000000 || m.MaxOutput != 128000 || !m.Reasoning || !m.AdaptiveThinking || m.Speculative { | |||
| 602 | + | t.Fatalf("unexpected Sonnet 5.5 model: %+v", m) | |||
| 603 | + | } | |||
| 604 | + | if m.PriceInput != 2 || m.PriceOutput != 10 || m.PriceCacheRead != 0.2 || m.PriceCacheWrite != 2.5 { | |||
| 605 | + | t.Fatalf("unexpected Sonnet 5.5 pricing: %+v", m) | |||
| 606 | + | } | |||
| 607 | + | } | |||
| 608 | + | ||||
| 596 | func TestClaudeSonnet5Catalog(t *testing.T) { | 609 | func TestClaudeSonnet5Catalog(t *testing.T) { | ||
| 597 | m, err := FindModel("anthropic", "claude-sonnet-5") | 610 | m, err := FindModel("anthropic", "claude-sonnet-5") | ||
| 598 | if err != nil { | 611 | if err != nil { | ||