Repository navigation
refactor(models): Claude Sonnet 5.5 is the platform default (was Sonnet 4.6) (#4757) - #4758
Conversation
…et 4.6) (#4757) - PLATFORM_DEFAULT_MODEL_VALUE and the catalog's `recommended` flag move to claude-sonnet-5-5. No row is seeded, so an install that never chose a default moves on upgrade; an admin's saved choice is kept. - The base image labels itself with its Claude Code version (trinity.claude-code-version). The platform-default rung steps down to claude-sonnet-4-6 (model_catalog.OLD_CLI_DEFAULT_MODEL, no minimum) for an agent whose label is absent, unparseable or below the default's min_claude_code, so an older image does not start failing model_unsupported. Explicit models and the agent's own default are not stepped down; non-Claude runtimes unchanged. - Agent image fallbacks become one DEFAULT_CLAUDE_MODEL constant, equal to the backend default (tested). Settings.vue seeds from the catalog's recommended entry; TasksPanel defaults to no model instead of posting a hard-coded id. Base-image change: rebuild needed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
/validate-pr — REQUEST CHANGES (lane C, independent run)Tier 1 is green (pytest head + base + regression diff, journey-smoke, e2e, prod-image-smoke, verify-non-root). Precedence, non-Claude runtimes and the turn paths are correct. One behaviour regression blocks the merge. Blocking: a saved admin default that works today is silently downgraded. This goes beyond AC3, which asks only that agents not start failing because of this change. It also cuts against AC2 ("an admin's choice is kept"). The only signal is a backend log line. Settings → Platform and the Workspace roster label still show the admin's model. This PR requires the following changes before merge:
Not blocking: the Tasks tab change is sound. A remembered choice is still sent. Someone who never picked a model used to get a forced Sonnet 4.6. Now they see "Default model", and the task runs on the agent's own model or the platform default. Please address these items and request re-review. |
…4757) The old-CLI step-down to Sonnet 4.6 now applies only when no admin saved a platform_default_model. A saved default is used as saved, exactly as before this PR, so an install already running a newer model keeps it after the upgrade, restarted or not. settings_service.platform_default_model_is_saved() reports whether the cached value came from a row (refreshed in the same block, so cache resets cover it). Mutation: with the guard in _runnable_platform_default removed, 5 tests in TestSavedDefaultIsNeverSteppedDown go red; restored, all 26 pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # tests/registry.json
Closes #4757
Operator request, 2026-11-24: make Sonnet 5.5 the system default (it was Sonnet 4.6).
What an upgraded install with no chosen default does
Trinity never seeded a
platform_default_modelrow, so an install where no admin saved a default reads the code default. After this release:trinity.claude-code-versionlabel. Every turn that names no model, and that the agent's own model does not cover, runs onclaude-sonnet-5-5.min_claude_code). Their turns keep running onclaude-sonnet-4-6, exactly as before. They do not failmodel_unsupported. The backend logs one warning per agent:[#4757] <agent>'s Claude Code (…) cannot run the platform default claude-sonnet-5-5; its turns run on claude-sonnet-4-6 until it restarts on the current base image. The existingfleet_base_image_stalealert names those agents. Restarting one moves it to 5.5.An install whose admin saved a default keeps that value and runs it exactly as before this PR, on every image, restarted or not: the step-down never touches a saved value.
An unlabelled image is treated as older, so an agent on such an image keeps the older model (Sonnet 4.6) until it is restarted onto the rebuilt image.
Design
Nothing told the backend which Claude Code an agent runs.
min_claude_codewas only checked against the base-image pin in CI. So:docker/base-image/Dockerfile:LABEL trinity.claude-code-version="${CLAUDE_CODE_VERSION}". Docker merges image labels into container labels.docker_service.get_agent_claude_code_version: reads the label and never raises.model_catalog:recommendedmoves toclaude-sonnet-5-5. NewOLD_CLI_DEFAULT_MODEL = "claude-sonnet-4-6", asserted at import to need no minimum CLI and to be admin-selectable. Newclaude_code_can_run(model, cli_version): an absent or unparseable version is not proof.agent_model_service.resolve_default_model, the one resolver every no-model path uses (task, schedule, loop, reminder, A2A, chat, Workspace): only the platform-default rung is checked, and only when that default is the code default (no saved row). If the default has nomin_claude_code, no container is read. Explicit per-turn/per-schedule models and the agent's owndefault_modelare not touched (AC4). Non-Claude runtimes still getNone, and OpenCode keeps its own default (AC5).settings_service.PLATFORM_DEFAULT_MODEL_VALUE = "claude-sonnet-5-5".headless_executor.DEFAULT_CLAUDE_MODEL, re-exported byclaude_code.py. A test keeps it equal to the backend constant.Settings.vueseeds from the catalog'srecommendedentry.TasksPanel.vuenow defaults to no model (placeholder "Default model"). It used to post a hard-codedclaude-sonnet-4-6as an explicit model. Moving that to 5.5 would have bypassed the step-down and broken old-image agents from the Tasks tab, so it is empty now and the backend resolves the model. A remembered per-agent choice is still sent.Behaviour notes
settings_service.platform_default_model_is_saved()). A saved default, including Sonnet 5.5 or Opus 5.5, is used as saved, exactly as before this PR.Release notes: "Config keys whose behaviour changed"
To carry into the next release notes (no draft file exists after v1.0.5):
platform_default_model(system setting, Settings → Platform): the default movesclaude-sonnet-4-6→claude-sonnet-5-5(refactor: make Claude Sonnet 5.5 the platform default model (was Sonnet 4.6) #4757). An install that never saved a value moves on upgrade, and a saved value is kept. An agent still on a base image older than this release keeps running onclaude-sonnet-4-6until it restarts on the rebuilt image. The stale-base-image alert lists those agents.Tests
tests/unit/test_4757_sonnet_55_default.py: 26 tests. They run through the realresolve_default_model, the realget_platform_default_modeland the real agent-image_setup_headless_command. One of them,test_the_default_cli_reader_is_the_container_label, patchesdocker_service.get_agent_container, so the production label wiring is exercised.TestSavedDefaultIsNeverSteppedDown(added in the fix round): a saved default runs as saved on an unlabelled, older or unparseable image and reads no container; it is driven through the realsettings_servicetoo. Mutation: with the saved-default guard in_runnable_platform_defaultremoved, 5 of these go red. Restored, all 26 pass.test_image_without_the_version_label_steps_down,…older_than_the_models_minimum…,…unparseable_label…,…failed_container_read…,…default_cli_reader_is_the_container_label). Restored, all pass.src/frontend/tests/unit/tasksPanelModelDefault4757.spec.js: mounted. With|| 'claude-sonnet-5-5'put back in the panel,posts no model when none was chosengoes red.test_platform_default_model.py,test_platform_default_model_regression.py(now pinDEFAULT_CLAUDE_MODEL),test_2086_model_catalog_parity.py.test_ent754_agent_server_skillinfo.py::test_a_different_home_keeps_both_folders; it fails the same way on untoucheddevin this container, because of the home path, and is unrelated. Frontend: the 32 TasksPanel/Settings/ModelSelector specs plus the ratchets pass (609 tests).Deploy
Base-image change: rebuild needed (
./scripts/deploy/build-base-image.sh). Agents get the label and the 5.5 fallback at their next cold start.Docs:
model-selection.md(table + revision row),feature-flows.mdindex,workspace-model-choice.md,architecture/agent-runtime.md(label paragraph), user docsagents/agent-configuration.md.🤖 Generated with Claude Code