From 8bdaeedb288fff0324e5050a855e36bb031e76b1 Mon Sep 17 00:00:00 2001 From: Anurag Saxena Date: Sun, 3 May 2026 04:21:43 -0400 Subject: [PATCH] fix: strip stream_options for qwen non-streaming Claude Code requests (closes #557) (#663) --- open-sse/executors/qwen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-sse/executors/qwen.js b/open-sse/executors/qwen.js index b62414dc..ae828118 100644 --- a/open-sse/executors/qwen.js +++ b/open-sse/executors/qwen.js @@ -87,7 +87,7 @@ export class QwenExecutor extends DefaultExecutor { transformRequest(model, body, stream, credentials) { let next = body && typeof body === "object" ? { ...body } : body; - if (stream && next?.messages && !next.stream_options) { + if (stream && next?.messages && !next.stream_options && !next.thinking && !next.enable_thinking && next.stream !== false) { next.stream_options = { include_usage: true }; } next = sanitizeQwenThinkingToolChoice(next);