Skip to content

Commit 795882b

Browse files
authored
Merge pull request ericc-ch#42 from caozhiyuan/feature/chat-completions-reasoning
fix: handleReasoningOpaqueInToolCalls add isToolBlockOpen judge
2 parents 51b1e23 + 7657d87 commit 795882b

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)