Skip to content

Commit 4790ea4

Browse files
authored
feat(adapters): update Anthropic models (#2556)
1 parent aa48d46 commit 4790ea4

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

lua/codecompanion/adapters/http/anthropic.lua

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -606,46 +606,40 @@ return {
606606
mapping = "parameters",
607607
type = "enum",
608608
desc = "The model that will complete your prompt. See https://docs.anthropic.com/claude/docs/models-overview for additional details and options.",
609-
default = "claude-sonnet-4-5-20250929",
609+
default = "claude-sonnet-4-5",
610610
choices = {
611-
["claude-sonnet-4-5-20250929"] = {
612-
formatted_name = "Claude Sonnet 4.5",
613-
opts = { can_reason = true, has_vision = true },
614-
},
615-
["claude-haiku-4-5-20251001"] = {
611+
["claude-haiku-4-5"] = {
616612
formatted_name = "Claude Haiku 4.5",
617613
opts = { can_reason = true, has_vision = true },
618614
},
619-
620-
["claude-sonnet-4-20250514"] = {
621-
formatted_name = "Claude Sonnet 4",
615+
["claude-opus-4-5"] = {
616+
formatted_name = "Claude Opus 4.5",
622617
opts = { can_reason = true, has_vision = true },
623618
},
624-
["claude-3-7-sonnet-20250219"] = {
625-
formatted_name = "Claude 3.7 Sonnet",
626-
opts = { can_reason = true, has_vision = true, has_token_efficient_tools = true },
627-
},
628-
["claude-3-5-sonnet-20241022"] = {
629-
formatted_name = "Claude Sonnet 3.5",
630-
opts = { has_vision = true },
619+
["claude-sonnet-4-5"] = {
620+
formatted_name = "Claude Sonnet 4.5",
621+
opts = { can_reason = true, has_vision = true },
631622
},
632-
["claude-opus-4-1-20250805"] = {
623+
["claude-opus-4-1"] = {
633624
formatted_name = "Claude Opus 4.1",
634625
opts = { can_reason = true, has_vision = true },
635626
},
636-
["claude-opus-4-20250514"] = {
627+
["claude-opus-4-0"] = {
637628
formatted_name = "Claude Opus 4",
638629
opts = { can_reason = true, has_vision = true },
639630
},
640-
["claude-3-5-haiku-20241022"] = {
641-
formatted_name = "Claude Haiku 3.5",
642-
opts = { has_vision = true },
631+
["claude-sonnet-4-0"] = {
632+
formatted_name = "Claude Sonnet 4",
633+
opts = { can_reason = true, has_vision = true },
634+
},
635+
["claude-3-7-sonnet-latest"] = {
636+
formatted_name = "Claude Sonnet 3.7",
637+
opts = { can_reason = true, has_vision = true, has_token_efficient_tools = true },
643638
},
644-
["claude-3-opus-20240229"] = {
645-
formatted_name = "Claude Opus 3",
639+
["claude-3-5-haiku-latest"] = {
640+
formatted_name = "Claude Haiku 3.5",
646641
opts = { has_vision = true },
647642
},
648-
"claude-2.1",
649643
},
650644
},
651645
---@type CodeCompanion.Schema

tests/adapters/http/test_anthropic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ T["Anthropic adapter"]["Reasoning models have more tokens"] = function()
561561
local reasoning = require("codecompanion.adapters").extend("anthropic", {
562562
schema = {
563563
model = {
564-
default = "claude-3-7-sonnet-20250219",
564+
default = "claude-3-7-sonnet-latest",
565565
},
566566
},
567567
})

0 commit comments

Comments
 (0)