fix(apicompat): recognize web_search_20250305 / google_search in Responses to Anthropic tool conversion

This commit is contained in:
Wuxie233
2026-04-25 01:09:51 +08:00
parent 5b5db88550
commit 5f630fbb19

View File

@@ -390,7 +390,7 @@ func convertResponsesToAnthropicTools(tools []ResponsesTool) []AnthropicTool {
var out []AnthropicTool var out []AnthropicTool
for _, t := range tools { for _, t := range tools {
switch t.Type { switch t.Type {
case "web_search": case "web_search", "google_search", "web_search_20250305":
out = append(out, AnthropicTool{ out = append(out, AnthropicTool{
Type: "web_search_20250305", Type: "web_search_20250305",
Name: "web_search", Name: "web_search",