From 4a431abe936d0b41bb71b54094d41457514c4748 Mon Sep 17 00:00:00 2001 From: yxia216 Date: Tue, 6 Oct 2026 16:18:50 -0400 Subject: [PATCH] add-sonnet-5.5 Signed-off-by: yxia216 --- internal/translator/anthropic_helper.go | 10 ++++++---- internal/translator/anthropic_helper_test.go | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/internal/translator/anthropic_helper.go b/internal/translator/anthropic_helper.go index 77bde83d8e..546dc9f1af 100644 --- a/internal/translator/anthropic_helper.go +++ b/internal/translator/anthropic_helper.go @@ -655,8 +655,8 @@ var awsOutputConfigModels = []string{ // gcpOutputConfigModels lists model identifiers that support structured outputs // on GCP Vertex AI: Claude Fable 5, Claude Mythos 5, Claude Opus 5.5, // Claude Opus 5, Claude Opus 4.8, Claude Mythos Preview, Claude Opus 4.7, -// Claude Opus 4.6, Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5, -// Claude Opus 4.5, and Claude Haiku 4.5. +// Claude Opus 4.6, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, +// Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5. var gcpOutputConfigModels = []string{ "opus-4-5", // Claude Opus 4.5 "sonnet-4-5", // Claude Sonnet 4.5 @@ -668,6 +668,7 @@ var gcpOutputConfigModels = []string{ "opus-5", // Claude Opus 5 "opus-5-5", // Claude Opus 5.5 "sonnet-5", // Claude Sonnet 5 + "sonnet-5-5", // Claude Sonnet 5.5 "fable-5", // Claude Fable 5 "mythos-5", // Claude Mythos 5 "mythos-preview", // Claude Mythos Preview @@ -687,8 +688,8 @@ func outputConfigAvailable(apiSchema filterapi.APISchemaName, model internalapi. // effortModels lists model identifiers that support the output_config.effort parameter. // The effort parameter is supported by Claude Fable 5, Claude Mythos 5, // Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Mythos Preview, -// Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5, Claude Sonnet 4.6, -// and Claude Opus 4.5. +// Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5.5, Claude Sonnet 5, +// Claude Sonnet 4.6, and Claude Opus 4.5. // See: https://platform.claude.com/docs/en/build-with-claude/effort var effortModels = []string{ "opus-4-5", // Claude Opus 4.5 @@ -699,6 +700,7 @@ var effortModels = []string{ "opus-5-5", // Claude Opus 5.5 "sonnet-4-6", // Claude Sonnet 4.6 "sonnet-5", // Claude Sonnet 5 + "sonnet-5-5", // Claude Sonnet 5.5 "fable-5", // Claude Fable 5 "mythos-5", // Claude Mythos 5 "mythos-preview", // Claude Mythos Preview diff --git a/internal/translator/anthropic_helper_test.go b/internal/translator/anthropic_helper_test.go index 0afd273fe1..4a925f30d9 100644 --- a/internal/translator/anthropic_helper_test.go +++ b/internal/translator/anthropic_helper_test.go @@ -854,6 +854,18 @@ func TestOutputConfigAvailable(t *testing.T) { model: "claude-opus-5-5", expected: false, }, + { + name: "claude-sonnet-5-5 supported on GCP", + apiSchema: filterapi.APISchemaGCPAnthropic, + model: "claude-sonnet-5-5", + expected: true, + }, + { + name: "claude-sonnet-5-5 not supported on AWS", + apiSchema: filterapi.APISchemaAWSAnthropic, + model: "claude-sonnet-5-5", + expected: false, + }, // Unsupported models on either backend. { name: "claude-3-sonnet not supported on GCP", @@ -1275,6 +1287,11 @@ func TestEffortAvailable(t *testing.T) { model: "claude-opus-5-5", expected: true, }, + { + name: "claude-sonnet-5-5 supported", + model: "claude-sonnet-5-5", + expected: true, + }, { name: "claude-sonnet-4-5-20250514 not supported", model: "claude-sonnet-4-5-20250514",