diff --git a/src/libs/agent-runtime/siliconcloud/index.ts b/src/libs/agent-runtime/siliconcloud/index.ts index 05a600d3662c..edc28f455e0f 100644 --- a/src/libs/agent-runtime/siliconcloud/index.ts +++ b/src/libs/agent-runtime/siliconcloud/index.ts @@ -3,6 +3,14 @@ import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory'; export const LobeSiliconCloudAI = LobeOpenAICompatibleFactory({ baseURL: 'https://api.siliconflow.cn/v1', + chatCompletion: { + handlePayload: (payload) => { + return { + ...payload, + stream: !payload.tools, + } as any; + }, + }, debug: { chatCompletion: () => process.env.DEBUG_SILICONCLOUD_CHAT_COMPLETION === '1', },