From 9676c7e888d01ba51144bea6483863e730be4bf6 Mon Sep 17 00:00:00 2001 From: Bruno Lorente Cantarero Date: Mon, 30 Mar 2026 10:47:32 +0200 Subject: [PATCH] fix(cron-tool): remove fallbacks from patch payload (not consumed by mergeCronPayload) --- src/agents/tools/cron-tool.schema.test.ts | 19 +++++++++++++++++++ src/agents/tools/cron-tool.ts | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/agents/tools/cron-tool.schema.test.ts b/src/agents/tools/cron-tool.schema.test.ts index c08098ce3d0..916401d8dff 100644 --- a/src/agents/tools/cron-tool.schema.test.ts +++ b/src/agents/tools/cron-tool.schema.test.ts @@ -82,6 +82,25 @@ describe("CronToolSchema", () => { ); }); + it("job.payload includes fallbacks", () => { + expect(keysAt(CronToolSchema as Record, "job.payload")).toContain("fallbacks"); + }); + + it("patch.payload omits fallbacks (not consumed by mergeCronPayload)", () => { + expect(keysAt(CronToolSchema as Record, "patch.payload")).toEqual( + [ + "allowUnsafeExternalContent", + "kind", + "lightContext", + "message", + "model", + "text", + "thinking", + "timeoutSeconds", + ].toSorted(), + ); + }); + it("job.failureAlert exposes after, channel, to, cooldownMs, mode, accountId", () => { expect(keysAt(CronToolSchema as Record, "job.failureAlert")).toEqual( ["accountId", "after", "channel", "cooldownMs", "mode", "to"].toSorted(), diff --git a/src/agents/tools/cron-tool.ts b/src/agents/tools/cron-tool.ts index f6a1ca19c59..ccc00e0d332 100644 --- a/src/agents/tools/cron-tool.ts +++ b/src/agents/tools/cron-tool.ts @@ -161,9 +161,6 @@ const CronPatchObjectSchema = Type.Optional( timeoutSeconds: Type.Optional(Type.Number()), lightContext: Type.Optional(Type.Boolean()), allowUnsafeExternalContent: Type.Optional(Type.Boolean()), - fallbacks: Type.Optional( - Type.Array(Type.String(), { description: "Fallback model ids" }), - ), }, { additionalProperties: true }, ),