Skip to content

Commit 7657d87

Browse files
committed
fix: handleReasoningOpaqueInToolCalls add isToolBlockOpen judge
1 parent dfb40d2 commit 7657d87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/messages/stream-translation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function handleReasoningOpaqueInToolCalls(
162162
events: Array<AnthropicStreamEventData>,
163163
delta: Delta,
164164
) {
165-
if (state.contentBlockOpen) {
165+
if (state.contentBlockOpen && !isToolBlockOpen(state)) {
166166
events.push({
167167
type: "content_block_stop",
168168
index: state.contentBlockIndex,

0 commit comments

Comments
 (0)