Просмотр исходного кода

fix: ensure toolStreaming is set to off by default when using non anthropic models with anthropic sdk (#24642)

Aiden Cline 4 месяцев назад
Родитель
Сommit
c361c2953f
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      packages/opencode/src/provider/transform.ts

+ 4 - 1
packages/opencode/src/provider/transform.ts

@@ -847,7 +847,10 @@ export function options(input: {
 }): Record<string, any> {
   const result: Record<string, any> = {}
 
-  if (input.model.api.npm === "@ai-sdk/google-vertex/anthropic") {
+  if (
+    input.model.api.npm === "@ai-sdk/google-vertex/anthropic" ||
+    (!input.model.api.id.includes("claude") && input.model.api.npm === "@ai-sdk/anthropic")
+  ) {
     result["toolStreaming"] = false
   }