feat(cron): per-job enabled_toolsets to cap token overhead + cost - #14767
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 listcron/scheduler.py:run_job()forwardsjob.get('enabled_toolsets')toAIAgent(...)tools/cronjob_tools.py:cronjobtool exposesenabled_toolsetson create + update, surfaces it in_format_jobcreate_job, 2 onrun_jobwiringscripts/release.py: AUTHOR_MAP entry for @say8hiValidation
Scope
Per-job opt-in only — the agent must pass
enabled_toolsetswhen 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 toolsconfig entirely (nocronplatform inPLATFORMSregistry, scheduler hardcodesdisabled_toolsets). That's the next PR — registercronas a platform and wire_get_platform_tools("cron")into the scheduler so users can disablemoa/browser/image_generateblanket-style without recreating every job.Closes #6130.