diff --git a/packages/service/core/workflow/dispatch/abandoned/runApp.ts b/packages/service/core/workflow/dispatch/abandoned/runApp.ts index 4f97a4af8..b30d444f9 100644 --- a/packages/service/core/workflow/dispatch/abandoned/runApp.ts +++ b/packages/service/core/workflow/dispatch/abandoned/runApp.ts @@ -61,6 +61,7 @@ export const dispatchAppRequest = async (props: Props): Promise => { const { flowResponses, flowUsages, assistantResponses, system_memories } = await runWorkflow({ ...props, + usageId: undefined, runningAppInfo: { id: String(appData._id), name: appData.name, diff --git a/packages/service/core/workflow/dispatch/ai/agent/toolCall.ts b/packages/service/core/workflow/dispatch/ai/agent/toolCall.ts index 2cea7a92c..70f11eaea 100644 --- a/packages/service/core/workflow/dispatch/ai/agent/toolCall.ts +++ b/packages/service/core/workflow/dispatch/ai/agent/toolCall.ts @@ -112,6 +112,7 @@ export const runToolCall = async ( // Run entry tool const toolRunResponse = await runWorkflow({ ...workflowProps, + usageId: undefined, isToolCall: true }); const stringToolResponse = formatToolResponse(toolRunResponse.toolResponses); diff --git a/packages/service/core/workflow/dispatch/child/runApp.ts b/packages/service/core/workflow/dispatch/child/runApp.ts index 6502e1981..4c2d4773d 100644 --- a/packages/service/core/workflow/dispatch/child/runApp.ts +++ b/packages/service/core/workflow/dispatch/child/runApp.ts @@ -134,6 +134,7 @@ export const dispatchRunAppNode = async (props: Props): Promise => { system_memories } = await runWorkflow({ ...props, + usageId: undefined, lastInteractive: childrenInteractive, // Rewrite stream mode ...(system_forbid_stream diff --git a/packages/service/core/workflow/dispatch/loop/runLoop.ts b/packages/service/core/workflow/dispatch/loop/runLoop.ts index 332895b79..0645fe78f 100644 --- a/packages/service/core/workflow/dispatch/loop/runLoop.ts +++ b/packages/service/core/workflow/dispatch/loop/runLoop.ts @@ -95,6 +95,7 @@ export const dispatchLoop = async (props: Props): Promise => { const response = await runWorkflow({ ...props, + usageId: undefined, lastInteractive: interactiveData?.childrenResponse, variables: newVariables, runtimeNodes, @@ -150,12 +151,14 @@ export const dispatchLoop = async (props: Props): Promise => { loopDetail: loopResponseDetail, mergeSignId: props.node.nodeId }, - [DispatchNodeResponseKeyEnum.nodeDispatchUsages]: [ - { - totalPoints, - moduleName: name - } - ], + [DispatchNodeResponseKeyEnum.nodeDispatchUsages]: totalPoints + ? [ + { + totalPoints, + moduleName: name + } + ] + : [], [DispatchNodeResponseKeyEnum.newVariables]: newVariables }; }; diff --git a/packages/service/core/workflow/dispatch/plugin/run.ts b/packages/service/core/workflow/dispatch/plugin/run.ts index fa2602d0e..2e950fd74 100644 --- a/packages/service/core/workflow/dispatch/plugin/run.ts +++ b/packages/service/core/workflow/dispatch/plugin/run.ts @@ -120,6 +120,7 @@ export const dispatchRunPlugin = async (props: RunPluginProps): Promise