feat(provider): add Anthropic Opus 5.5 and Fable 5.1 (#220)
- commit
- 4d44671c08e6d11074ce36d8dfa6cd689383fa05
- author
- bnema · · 2026-09-22 19:00 UTC
- committer
- GitHub · · 2026-09-22 19:00 UTC
- parent
- d12400c
- signature
- GPG Unverified
B5690EEEBB952194The key is unknown
2 files · +36 -0
M packages/provider/models.go +10 -0
| @@ -307,6 +307,11 @@ var Catalog = []Model{ | |||
| 307 | 307 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |
| 308 | 308 | PriceInput: 5, PriceOutput: 25, PriceCacheRead: 0.5, PriceCacheWrite: 6.25, | |
| 309 | 309 | }, | |
| 310 | + | { | |
| 311 | + | Provider: "anthropic", ID: "claude-opus-5-5", DisplayName: "Claude Opus 5.5", | |
| 312 | + | ContextWindow: 500000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |
| 313 | + | PriceInput: 4, PriceOutput: 20, PriceCacheRead: 0.2, PriceCacheWrite: 5, | |
| 314 | + | }, | |
| 310 | 315 | { | |
| 311 | 316 | Provider: "anthropic", ID: "claude-sonnet-4-6", DisplayName: "Claude Sonnet 4.6", | |
| 312 | 317 | ContextWindow: 1000000, MaxOutput: 64000, Reasoning: true, | |
| @@ -324,6 +329,11 @@ var Catalog = []Model{ | |||
| 324 | 329 | PriceInput: 10, PriceOutput: 50, PriceCacheRead: 0.5, PriceCacheWrite: 6.25, | |
| 325 | 330 | Speculative: true, | |
| 326 | 331 | }, | |
| 332 | + | { | |
| 333 | + | Provider: "anthropic", ID: "claude-fable-5-1", DisplayName: "Claude Fable 5.1", | |
| 334 | + | ContextWindow: 500000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |
| 335 | + | PriceInput: 10, PriceOutput: 50, PriceCacheRead: 0.25, PriceCacheWrite: 12.5, | |
| 336 | + | }, | |
| 327 | 337 | ||
| 328 | 338 | // ---- Speculative: OpenAI ---- | |
| 329 | 339 | // Public OpenAI API route. The ChatGPT/Codex subscription route is | |
| @@ -307,6 +307,11 @@ var Catalog = []Model{ | |||||
| 307 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | 307 | ContextWindow: 1000000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | ||
| 308 | PriceInput: 5, PriceOutput: 25, PriceCacheRead: 0.5, PriceCacheWrite: 6.25, | 308 | PriceInput: 5, PriceOutput: 25, PriceCacheRead: 0.5, PriceCacheWrite: 6.25, | ||
| 309 | }, | 309 | }, | ||
| 310 | + | { | |||
| 311 | + | Provider: "anthropic", ID: "claude-opus-5-5", DisplayName: "Claude Opus 5.5", | |||
| 312 | + | ContextWindow: 500000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |||
| 313 | + | PriceInput: 4, PriceOutput: 20, PriceCacheRead: 0.2, PriceCacheWrite: 5, | |||
| 314 | + | }, | |||
| 310 | { | 315 | { | ||
| 311 | Provider: "anthropic", ID: "claude-sonnet-4-6", DisplayName: "Claude Sonnet 4.6", | 316 | Provider: "anthropic", ID: "claude-sonnet-4-6", DisplayName: "Claude Sonnet 4.6", | ||
| 312 | ContextWindow: 1000000, MaxOutput: 64000, Reasoning: true, | 317 | ContextWindow: 1000000, MaxOutput: 64000, Reasoning: true, | ||
| @@ -324,6 +329,11 @@ var Catalog = []Model{ | |||||
| 324 | PriceInput: 10, PriceOutput: 50, PriceCacheRead: 0.5, PriceCacheWrite: 6.25, | 329 | PriceInput: 10, PriceOutput: 50, PriceCacheRead: 0.5, PriceCacheWrite: 6.25, | ||
| 325 | Speculative: true, | 330 | Speculative: true, | ||
| 326 | }, | 331 | }, | ||
| 332 | + | { | |||
| 333 | + | Provider: "anthropic", ID: "claude-fable-5-1", DisplayName: "Claude Fable 5.1", | |||
| 334 | + | ContextWindow: 500000, MaxOutput: 128000, Reasoning: true, AdaptiveThinking: true, | |||
| 335 | + | PriceInput: 10, PriceOutput: 50, PriceCacheRead: 0.25, PriceCacheWrite: 12.5, | |||
| 336 | + | }, | |||
| 327 | 337 | ||||
| 328 | // ---- Speculative: OpenAI ---- | 338 | // ---- Speculative: OpenAI ---- | ||
| 329 | // Public OpenAI API route. The ChatGPT/Codex subscription route is | 339 | // Public OpenAI API route. The ChatGPT/Codex subscription route is | ||
M packages/provider/provider_test.go +26 -0
| @@ -567,6 +567,32 @@ func TestClaudeOpus5Catalog(t *testing.T) { | |||
| 567 | 567 | } | |
| 568 | 568 | } | |
| 569 | 569 | ||
| 570 | + | func TestClaudeOpus55Catalog(t *testing.T) { | |
| 571 | + | m, err := FindModel("anthropic", "claude-opus-5-5") | |
| 572 | + | if err != nil { | |
| 573 | + | t.Fatal(err) | |
| 574 | + | } | |
| 575 | + | if m.DisplayName != "Claude Opus 5.5" || m.ContextWindow != 500000 || m.MaxOutput != 128000 || !m.Reasoning || !m.AdaptiveThinking || m.Speculative { | |
| 576 | + | t.Fatalf("unexpected Opus 5.5 model: %+v", m) | |
| 577 | + | } | |
| 578 | + | if m.PriceInput != 4 || m.PriceOutput != 20 || m.PriceCacheRead != 0.2 || m.PriceCacheWrite != 5 { | |
| 579 | + | t.Fatalf("unexpected Opus 5.5 pricing: %+v", m) | |
| 580 | + | } | |
| 581 | + | } | |
| 582 | + | ||
| 583 | + | func TestClaudeFable51Catalog(t *testing.T) { | |
| 584 | + | m, err := FindModel("anthropic", "claude-fable-5-1") | |
| 585 | + | if err != nil { | |
| 586 | + | t.Fatal(err) | |
| 587 | + | } | |
| 588 | + | if m.DisplayName != "Claude Fable 5.1" || m.ContextWindow != 500000 || m.MaxOutput != 128000 || !m.Reasoning || !m.AdaptiveThinking || m.Speculative { | |
| 589 | + | t.Fatalf("unexpected Fable 5.1 model: %+v", m) | |
| 590 | + | } | |
| 591 | + | if m.PriceInput != 10 || m.PriceOutput != 50 || m.PriceCacheRead != 0.25 || m.PriceCacheWrite != 12.5 { | |
| 592 | + | t.Fatalf("unexpected Fable 5.1 pricing: %+v", m) | |
| 593 | + | } | |
| 594 | + | } | |
| 595 | + | ||
| 570 | 596 | func TestClaudeSonnet5Catalog(t *testing.T) { | |
| 571 | 597 | m, err := FindModel("anthropic", "claude-sonnet-5") | |
| 572 | 598 | if err != nil { | |
| @@ -567,6 +567,32 @@ func TestClaudeOpus5Catalog(t *testing.T) { | |||||
| 567 | } | 567 | } | ||
| 568 | } | 568 | } | ||
| 569 | 569 | ||||
| 570 | + | func TestClaudeOpus55Catalog(t *testing.T) { | |||
| 571 | + | m, err := FindModel("anthropic", "claude-opus-5-5") | |||
| 572 | + | if err != nil { | |||
| 573 | + | t.Fatal(err) | |||
| 574 | + | } | |||
| 575 | + | if m.DisplayName != "Claude Opus 5.5" || m.ContextWindow != 500000 || m.MaxOutput != 128000 || !m.Reasoning || !m.AdaptiveThinking || m.Speculative { | |||
| 576 | + | t.Fatalf("unexpected Opus 5.5 model: %+v", m) | |||
| 577 | + | } | |||
| 578 | + | if m.PriceInput != 4 || m.PriceOutput != 20 || m.PriceCacheRead != 0.2 || m.PriceCacheWrite != 5 { | |||
| 579 | + | t.Fatalf("unexpected Opus 5.5 pricing: %+v", m) | |||
| 580 | + | } | |||
| 581 | + | } | |||
| 582 | + | ||||
| 583 | + | func TestClaudeFable51Catalog(t *testing.T) { | |||
| 584 | + | m, err := FindModel("anthropic", "claude-fable-5-1") | |||
| 585 | + | if err != nil { | |||
| 586 | + | t.Fatal(err) | |||
| 587 | + | } | |||
| 588 | + | if m.DisplayName != "Claude Fable 5.1" || m.ContextWindow != 500000 || m.MaxOutput != 128000 || !m.Reasoning || !m.AdaptiveThinking || m.Speculative { | |||
| 589 | + | t.Fatalf("unexpected Fable 5.1 model: %+v", m) | |||
| 590 | + | } | |||
| 591 | + | if m.PriceInput != 10 || m.PriceOutput != 50 || m.PriceCacheRead != 0.25 || m.PriceCacheWrite != 12.5 { | |||
| 592 | + | t.Fatalf("unexpected Fable 5.1 pricing: %+v", m) | |||
| 593 | + | } | |||
| 594 | + | } | |||
| 595 | + | ||||
| 570 | func TestClaudeSonnet5Catalog(t *testing.T) { | 596 | func TestClaudeSonnet5Catalog(t *testing.T) { | ||
| 571 | m, err := FindModel("anthropic", "claude-sonnet-5") | 597 | m, err := FindModel("anthropic", "claude-sonnet-5") | ||
| 572 | if err != nil { | 598 | if err != nil { | ||