Skip to content

Commit 70257ba

Browse files
committed
Fix the error where Claude's chain of thought validation failed.
Previously, the text field was used, which caused validation failures and errors, even though clients could see the content. This was because the content was placed in a box named text instead of thinking. This issue has now been fixed, and Claude-related models can correctly return the chain of thought.
1 parent 2e82b12 commit 70257ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/server/handlers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ func streamOpenAIToClaude(w *bufio.Writer, reader io.Reader, providerModel strin
401401
"index": thinkingBlockIndex,
402402
"content_block": map[string]interface{}{
403403
"type": "thinking",
404+
"thinking": "",
404405
},
405406
})
406407
thinkingBlockStarted = true
@@ -413,7 +414,7 @@ func streamOpenAIToClaude(w *bufio.Writer, reader io.Reader, providerModel strin
413414
"index": thinkingBlockIndex,
414415
"delta": map[string]interface{}{
415416
"type": "thinking_delta",
416-
"text": reasoningContent,
417+
"thinking": reasoningContent,
417418
},
418419
})
419420
}

0 commit comments

Comments
 (0)