mirror of https://github.com/openclaw/openclaw.git
fix(cron-tool): remove fallbacks from patch payload (not consumed by mergeCronPayload)
This commit is contained in:
parent
314b7f96e4
commit
9676c7e888
|
|
@ -82,6 +82,25 @@ describe("CronToolSchema", () => {
|
|||
);
|
||||
});
|
||||
|
||||
it("job.payload includes fallbacks", () => {
|
||||
expect(keysAt(CronToolSchema as Record<string, unknown>, "job.payload")).toContain("fallbacks");
|
||||
});
|
||||
|
||||
it("patch.payload omits fallbacks (not consumed by mergeCronPayload)", () => {
|
||||
expect(keysAt(CronToolSchema as Record<string, unknown>, "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<string, unknown>, "job.failureAlert")).toEqual(
|
||||
["accountId", "after", "channel", "cooldownMs", "mode", "to"].toSorted(),
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue