diff --git a/packages/core/src/systems.ts b/packages/core/src/systems.ts index 50b82f0d1b..299c7d955c 100644 --- a/packages/core/src/systems.ts +++ b/packages/core/src/systems.ts @@ -101,7 +101,7 @@ export function resolveSystems( if (responseSchema && !responseType) systems.push("system.output_json") // Include tools-related systems if specified in the script - if (tools.length) { + if (tools.length || resolvedTools?.length) { systems.push("system.tools") // Resolve and add each tool's systems based on its definition in the project tools.forEach((tool) =>