fix: strip stream_options for qwen non-streaming Claude Code requests (closes #557) (#663)

This commit is contained in:
Anurag Saxena
2026-05-03 04:21:43 -04:00
committed by GitHub
parent 67ca219fbf
commit 8bdaeedb28

View File

@@ -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);