Skip to content

Setup: the picked model is the cron model too - #533

Merged
alex-clickhouse merged 1 commit into
mainfrom
pufit/setup-cron-model
Oct 20, 2026
Merged

alex-clickhouse merged 1 commit into
mainfrom
pufit/setup-cron-model

Conversation

@pufit

@pufit pufit commented Oct 20, 2026

Copy link
Copy Markdown
Member

What

Picking a model on the setup page's Model step now writes agent.cron_model alongside agent.model. Before, the cron model stayed at the installer's default (claude-sonnet-5-5), so an instance set up for Opus ran every scheduled job — most of a worker's work — on Sonnet without anyone choosing that.

Cost note: the default wizard path now runs scheduled jobs on the chat model (Opus by default) instead of Sonnet. That is the point of the change; agent.cron_model in settings.yaml remains the knob for a cheaper one, and a later save that picks nothing leaves it alone.

How

  • nerve/setup_writer.py: build_config_layers derives agent.cron_model from agent_model (the picker's answer), after the Bedrock block, so a geo-prefixed pick lands as-is.
  • nerve/gateway/routes/setup.py: the Model step publishes agent.cron_model whenever a model is in the request. An effort-only or credential-only save touches neither; a switch into or out of Bedrock without a pick returns both to the installer's defaults (geo-prefixed on Bedrock), as before.
  • web/…/ProviderStep.tsx: the picker on screen during the first pass is the choice, the preselected default included — the page sends its model after a live test on a pending step and on the Continue that follows a credential save. Not on a save that moves into or out of Bedrock (the model on screen belongs to the other provider; the server applies the region's ids). A done step visited later sends the model only when it changes, so a cron model set by hand is left alone; WizardShell now also drops the "Saved…" notice when the wizard unmounts, so a later visit confirms nothing. The line under the picker says what scheduled jobs will run on: "Scheduled jobs run on this model too." when the pick is sent (or already agrees), otherwise "Scheduled jobs run on ; choosing a different model here moves them to it."
  • Instances whose credential is managed (environment, configuration repository, proxy) or that were set up in the terminal never confirm a pick, so their cron model stays at the installer's default; the line under the picker says so.
  • Docs: docs/setup.md (step table + Model notes), docs/config.md (agent.cron_model), docs/api.md (PUT contract + example).

Tests

  • tests/test_setup_api.py: the two exact-equality expectations now include cron_model; new test_the_cron_model_follows_the_picked_model walks pick → a hand-set cron model survives an effort-only and a credential-only save → switch to Bedrock → pick on Bedrock → leave Bedrock.
  • tests/test_setup_writer.py: the writer test asserts the derived cron_model.
  • web/…/SetupWizard.test.tsx: the Continue after a credential save carries the preselected model; a live test then Continue sends it with the credential; Bedrock after a live test sends no model; a "Saved" notice does not outlive the wizard; the help line names another cron model and switches once a pick is made.
  • Full pytest tests/, npm test and npm run build green in the worktree.

Generated by Nerve

The Model step wrote agent.model and left agent.cron_model at the
installer's default, so an instance set up for Opus ran every scheduled
job — most of a worker's work — on Sonnet without anyone choosing that.
build_config_layers now derives cron_model from the pick and the step
writes both. The page sends the picker's model after a live test and on
the Continue that follows a credential save, so the preselected default
counts as the choice; a done step visited later sends it only when it
changes, and a cron model set by hand survives effort-only and
credential-only saves. The picker says what scheduled jobs will run on,
and the docs follow.
@alex-clickhouse
alex-clickhouse merged commit 4b17f9b into main Oct 20, 2026
4 checks passed
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.

2 participants