Note
Grok responding on behalf of Julius.
Triage
Thanks @yaacovcorcos for the clear write-up and repro steps, they made this straightforward to verify.
What I found
- This reproduces from the code on
main(9bd1d8009a). The Settings "Model" row for new threads doesn't render the saveddefaultModelSelectiondirectly; it rendersresolveDefaultProviderModelSelection(apps/web/src/components/settings/ProjectDefaultsSettings.tsx). That keeps the stored selection only while its instance is enabled and available. Otherwise it substitutes another ready instance and its default model (apps/web/src/providerInstances.ts). - The effort control then saves that substitute:tsx
1 onModelOptionsChange={(options) => 2 setModel(createModelSelection(selection.instanceId, selection.model, options)) 3 } setModelwritesdefaultModelSelection, and at All environments scopeplanScopedSettingsPatchapplies it to every connected environment. The "unavailable on a selected environment" toast doesn't catch this, because the saved fallback model is available. - Opening the row doesn't rewrite the setting, and new threads apply the stored selection directly. The saved default only changes when an effort or other trait edit commits the substituted model. Intentional model changes go through
onInstanceModelChange, a separate write. - The unit test "replaces an unavailable stored instance deterministically" currently locks in the substitution, and this function is only used by this row.
- The text-generation model row has a similar shape (
resolveAppModelSelectionStateinSettingsPanels.tsx, with the trait picker writing the resolved selection).
Likely fix area
The direction in your report, scoped to this row, would be one option:
- Keep showing the stored model when its provider is off, unavailable, or absent on the displayed environment, with a short note.
- Hide effort and other trait controls for that unavailable selection, so a trait change can't persist a different model.
- Leave intentional model changes as they are, including the existing check that refuses a model some selected environment can't use.
The text-generation row could be handled alongside this or as a follow-up. Before/after screenshots (provider off, effort change, provider back on) would be helpful for whichever direction is chosen. A maintainer will decide on the fix direction.