소스 검색

fix: anthropic msg transform

Aiden Cline 4 달 전
부모
커밋
b726e9b59e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/opencode/src/provider/transform.ts

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

@@ -53,7 +53,7 @@ export namespace ProviderTransform {
   ): ModelMessage[] {
   ): ModelMessage[] {
     // Anthropic rejects messages with empty content - filter out empty string messages
     // Anthropic rejects messages with empty content - filter out empty string messages
     // and remove empty text/reasoning parts from array content
     // and remove empty text/reasoning parts from array content
-    if (model.api.npm === "@ai-sdk/anthropic" || model.api.npm === "@ai-sdk/amazon-bedrock") {
+    if (model.api.npm === "@ai-sdk/amazon-bedrock") {
       msgs = msgs
       msgs = msgs
         .map((msg) => {
         .map((msg) => {
           if (typeof msg.content === "string") {
           if (typeof msg.content === "string") {