Skip to content

Commit 63425e0

Browse files
committed
fix: track tool_call_start in hasContent to avoid false empty-stream warning
Tool-only responses (no text) are valid content. Without this, agentic tool-call responses would incorrectly trigger the empty response warning message.
1 parent dff0609 commit 63425e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/providers/gemini.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
146146
}
147147

148148
for (const chunk of processAiSdkStreamPart(part)) {
149-
if (chunk.type === "text") {
149+
if (chunk.type === "text" || chunk.type === "tool_call_start") {
150150
hasContent = true
151151
}
152152
yield chunk

0 commit comments

Comments
 (0)