Skip to content

feat(cron): per-job enabled_toolsets to cap token overhead + cost - #14767

Merged
teknium1 merged 4 commits into
mainfrom
hermes/hermes-2f58d50c
Apr 23, 2026
Merged

feat(cron): per-job enabled_toolsets to cap token overhead + cost#14767
teknium1 merged 4 commits into
mainfrom
hermes/hermes-2f58d50c

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #6130 (@say8hi) onto current main.

Summary

Lets the agent restrict a cron job to a subset of toolsets at creation time, so a "fetch news + summarize" job doesn't have to carry moa, browser, image_generate, etc. in its tool schema on every iteration.

Motivated by Norbert's Discord report — $4.63 burned in one cron run after the agent reached for mixture_of_agents, and cron currently has no way to gate toolsets.

Changes

  • cron/jobs.py: create_job(..., enabled_toolsets=None) normalizes + persists the list
  • cron/scheduler.py: run_job() forwards job.get('enabled_toolsets') to AIAgent(...)
  • tools/cronjob_tools.py: cronjob tool exposes enabled_toolsets on create + update, surfaces it in _format_job
  • tests: 6 unit tests on create_job, 2 on run_job wiring
  • scripts/release.py: AUTHOR_MAP entry for @say8hi

Validation

tests/cron/test_jobs.py::TestEnabledToolsets + tests/cron/test_scheduler.py
96 passed in 2.08s

Scope

Per-job opt-in only — the agent must pass enabled_toolsets when creating the job. Existing jobs and jobs created without the field keep loading the full default toolset (current behavior, no regression).

Does NOT address the global gap: cron ignores hermes tools config entirely (no cron platform in PLATFORMS registry, scheduler hardcodes disabled_toolsets). That's the next PR — register cron as a platform and wire _get_platform_tools("cron") into the scheduler so users can disable moa/browser/image_generate blanket-style without recreating every job.

Closes #6130.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants