From 49ed4963fff9330178f37e870e82cb767eee9c9f Mon Sep 17 00:00:00 2001 From: fjia Date: Tue, 16 Jun 2026 15:43:40 +0800 Subject: [PATCH] @ fix(commandcode): force params.stream=true for non-streaming requests The CommandCode /alpha/generate API requires stream=true unconditionally. While chatCore.js already forces stream=true for commandcode provider, the executor transformRequest only set body.stream (top-level), missing body.params.stream in already-translated CommandCode-native bodies. This caused HTTP 400 ("expected true at params.stream") or ECONNRESET for ~58% of CommandCode requests where stream was explicitly false. Closes #1840 Co-Authored-By: Claude @ --- open-sse/executors/commandcode.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/open-sse/executors/commandcode.js b/open-sse/executors/commandcode.js index 772bf4c811..5797ee8741 100644 --- a/open-sse/executors/commandcode.js +++ b/open-sse/executors/commandcode.js @@ -20,7 +20,13 @@ export class CommandCodeExecutor extends BaseExecutor { } transformRequest(model, body, stream, credentials) { + // CommandCode API requires stream=true unconditionally. + // Set both top-level (OpenAI-format bodies) and params.stream + // (CommandCode-native bodies) to cover all code paths. body.stream = true; + if (body.params) { + body.params.stream = true; + } return body; }