Skip to content

fix(cron): schedule.delay.unit 补上 type:"string",修复 moonshot schema 校验失败 - #438

Open
CharlesChor wants to merge 1 commit into
OpenBMB:mainfrom
CharlesChor:fix/cron-schedule-schema-unit-type
Open

fix(cron): schedule.delay.unit 补上 type:"string",修复 moonshot schema 校验失败#438
CharlesChor wants to merge 1 commit into
OpenBMB:mainfrom
CharlesChor:fix/cron-schedule-schema-unit-type

Conversation

@CharlesChor

Copy link
Copy Markdown

问题

CRON_SCHEDULE_SCHEMAdelay 分支中 unit 字段仅有 enum 缺少 type,导致 moonshot 在加载 cron_create 工具时校验失败:

tools.function.parameters is not a valid moonshot flavored json schema
→ At path 'properties.schedule.anyOf.properties.unit': type is not defined

结果所有依赖该工具的 agent 对话返回「服务暂时不可用」。

修复

unit 补上 type: "string"

unit: { type: "string", enum: ["second", "minute", "hour", "day"] },

验证

修复后模型成功接受工具定义,cron 定时能力正常工作("10分钟后提醒开会" 可执行)。

🤖 Generated with Claude Code

CRON_SCHEDULE_SCHEMA 的 delay 分支中 unit 字段仅有 enum 缺少 type,
导致 moonshot 在加载 cron_create 工具时校验失败:
  tools.function.parameters is not a valid moonshot flavored json schema
  → At path 'properties.schedule.anyOf.properties.unit': type is not defined
从而使所有依赖该工具的 agent 对话返回「服务暂时不可用」。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant