feat(cron): expose per-job Model field in Create/Edit Job modal - #48427
Closed
nujovich wants to merge 1 commit into
Closed
feat(cron): expose per-job Model field in Create/Edit Job modal#48427nujovich wants to merge 1 commit into
nujovich wants to merge 1 commit into
Conversation
The cron scheduler already resolves a per-job model override
(cron/scheduler.py: model = job.get("model") or env or default), but
the dashboard never exposed it, so users had to hand-edit
~/.hermes/cron/jobs.json — which the gateway can overwrite on the
next tick.
This adds a free-text "Model (optional)" input to the Create and Edit
Job modals, wired into the existing create/update payload under the
model key (English-only string via the existing optional-i18n-key +
fallback pattern; other locales fill in later).
The Edit/update path already accepted model end-to-end (CronJobUpdate
forwards the full updates dict). The Create path did NOT: the POST
handler whitelisted fields and dropped model, and CronJobCreate had no
such field — so a frontend-only change would have been silently
discarded on create. Added the minimal forward: model on CronJobCreate
plus passing it through to create_job().
Draft until maintainer direction on UX: free text vs dropdown vs
autocomplete.
nujovich
marked this pull request as ready for review
June 18, 2026 13:58
tonydwb
approved these changes
Jun 18, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- Clean feature addition: Model field in Create/Edit Job modals, wired to the existing per-job model override in CronJobCreate + create_job
- No backend logic changes: Only wires up the existing model kwarg that create_job() already accepted
- Correct type updates: model on CronJobCreate, CronJob interface, create/update payload types
- i18n strings added: modelOptional and modelPlaceholder following existing patterns
- No debug artifacts or secrets
Minor Note
- Frontend accepts any string as model; invalid model names would fail silently at cron run time rather than at job creation. This is acceptable for free-text UX and consistent with the backend accepting arbitrary strings. A validation dropdown (which the author already raised as an option) could improve this later.
Reviewed by Hermes Agent
19 tasks
Author
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.
Summary
The cron scheduler already resolves a per-job
modeloverride(
cron/scheduler.py:model = job.get("model") or os.getenv("HERMES_MODEL") or "").The cron UI did not expose it, so users either accept the gateway
default or hand-edit
~/.hermes/cron/jobs.json. Hand-editing isfragile: the gateway rewrites the file on each tick, so the user has
to stop the gateway to make the edit stick.
This PR adds a free-text Model (optional) input to the Create and
Edit Job modals, wired into the existing create/update payload under
the
modelkey.Screenshots
Create Job modal
Edit Job modal (After shows the field pre-filled from the job's
model)A note (I was not sure if backend supports model)
The PUT path forwards the whole
updatesdict, somodelround-trips.But the POST handler whitelisted fields (
prompt/schedule/name/deliver/skills) andCronJobCreatehad nomodelfield, so a frontend-only change wouldhave been silently dropped on create. I added the minimal forward
(2 lines):
modelonCronJobCreate+ passing it tocreate_job()(which already accepted the kwarg). Happy to split that into its own
commit/PR if you'd prefer the UI and backend forward to land
separately.
Files
web/src/pages/CronPage.tsx— Model input in both modals, state,payload wiring (create omits empty; edit clears to
null).web/src/lib/api.ts—modelon the create/update payload types andon the
CronJobinterface.web/src/i18n/{types,en}.ts— optionalmodelOptional/modelPlaceholderkeys + English strings, following the existingoptional-key +
??fallback pattern (other locales fill in later).hermes_cli/web_server.py—modelonCronJobCreate+ forwardedin the POST handler.
Question for maintainers
Three viable UX shapes — I want your call before I iterate:
moonshotai/kimi-k2.6or anystring. Smallest change, no model-registry dependency.
list
/modelor the providers config exposes). Requires a backendendpoint to expose that list.
from the known list.
I shipped (1) because it's the minimal change that closes the gap.
Tell me which direction you want and I'll iterate inside this same PR.
Coordination
I checked PR #48275 (pluggable CronScheduler). It's backend-only and
explicitly does not touch the model field. No conflict either way on
merge order.
Out of scope
providerandbase_urlfields (separate PRs if you want them).docs/user-guide/features/crondoesn't currently listmodelas a field — happy to do a follow-up docs PR once the UXshape is settled).
Tests
There is no unit-test harness for the web dashboard (
web/package.jsonexposes only
dev/build/lint/typecheck), so per the no-new-test-framework constraint this ships with a manual test note instead.
npm run typecheckandnpm run lintpass.Manual test
moonshotai/kimi-k2.6in Model →create the job.
~/.hermes/cron/jobs.json— new job has"model": "moonshotai/kimi-k2.6"."model": null.