Skip to content

Studio: one run settings dropdown per model, and the last setting used is what loads - #15247

Merged
shimmyshimmer merged 17 commits into
mainfrom
studio-run-settings-saved
Oct 26, 2026
Merged

shimmyshimmer merged 17 commits into
mainfrom
studio-run-settings-saved

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

What changes for the user

One settings dropdown per model. The footer of Run settings (in the model picker and the chat sidebar) now has a single dropdown:

  • Default settings for comes first. When it is selected the dropdown just says "Default settings". It cannot be renamed or deleted.
  • Below a divider come the model's saved settings. Each row has a pencil to rename it and a trash icon to delete it. Deleting the setting in use goes back to Default settings.
  • Settings are kept per model, across quants, up to 24 per model, in this browser.

The last setting used is what loads. Picking a setting in the dropdown applies it right away, with no Save needed, and the next load (including loads through the API) uses it. Reset does the same for Default settings.

Making a new setting. Change anything while Default settings is selected and the dropdown switches to " custom settings" with "Unsaved changes". From there:

  • Save keeps it under that name, and Load saves it too before loading.
  • The pencil beside the dropdown opens a name box first, so it can be saved under your own name. On a saved setting the same pencil renames it. It is hidden on Default settings.

Edits to a saved setting are saved into that setting by Save or Load.

Removed. The "Remember for this model" checkbox and the second Save / Forget button are gone: the dropdown selection now decides what loads, and there is one Save.

Shared across quants. A saved setting belongs to the model, so when two quants use the same one, saving or deleting it updates both quants' remembered settings and the API overrides.

Upgrading. Settings remembered before this change show up as a " custom settings" entry and stay selected, so nothing a user saved stops applying.

How it was verified

  • npm run typecheck, npm test (13957 pass, including saved-run-settings.test.ts, run-settings-save-state.test.ts and share-run-configs.editor.test.ts), npm run build. Biome is clean on the changed files apart from findings that were already on main.
  • tests/studio/test_model_picker_contracts.py and tests/studio/playwright_model_config.py now follow the dropdown instead of the Remember checkbox. The Playwright test passes against a live Studio.
  • The startup bundle budget in scripts/check-bundle-budget.ts is raised by this PR's measured growth (9.4 KB raw / 3.1 KB transfer against the merge base, noted in the file).
  • Live Studio with SmolLM2-135M loaded, in dark and light themes:
    • Picking Default settings applied it at once.
    • Editing Default showed " custom settings", and Save stored it.
    • The pencil named an edited Default before it was saved.
    • Renaming and deleting from the row icons left the current selection alone.
    • Reset on a saved setting switched back to Default settings.
    • A set left over from an older build was renamed on reload and stayed selected.

Not testable here

Nothing GPU-specific: these are panel and storage changes. Saved settings live in browser storage like the existing per-model settings, so they do not follow a user to another browser.

Screenshots

The dropdown: Default settings, a divider, then saved settings with rename and delete on each row:

Run settings dropdown

Default settings after an edit becomes " custom settings", with the pencil to name it:

Edited Default shown as custom settings

Naming it before it is saved:

Naming a new setting

After Reset, back on Default settings:

Reset back to Default settings

The sidebar is too narrow for Remember for this model and the save status on
one row, so both were cut off. The status now sits under the checkbox and
keeps its line while empty, so a status appearing never moves the buttons.
… save

Remember for this model is the switch that keeps settings; Load model already
saves while it is ticked. The run settings button is now Save without loading
and only appears with unsaved changes (or as Forget settings once unticked);
the sampling panel's Save follows the same rule. A ticked box with changes
not saved yet now says Unsaved changes.
Run settings gain a Saved settings row, laid out like the Preset row: pick a
saved set to fill the panel, type a name and Save to keep what is on screen
(Update replaces one with that name), Delete to drop it. Sets are kept per
model across quants, up to 24, in this browser. Remember for this model still
decides what a load applies, including API loads, so a picked set becomes the
remembered one only once loaded or saved with Remember ticked.

Forget settings, the button that drops the remembered settings without a
reload, is now Forget without loading to mirror Save without loading.
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T01:19:44.389330Z f020cd4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

With every run settings panel in a tab closed, no storage listener ran, so a
set saved or deleted in another tab stayed missing or stale until reload. The
cache is now cleared whenever a panel subscribes.
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 79991a32e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Default settings plus the model's saved settings in one dropdown, with rename and delete on each row and a pencil beside it. Picking a setting, Reset, Save and Load all make it what the model loads with next, so the last one used applies. Editing Default shows it as "<model> custom settings" until it is saved or named. The Remember checkbox and the second Save are gone.
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
@shimmyshimmer shimmyshimmer changed the title Studio: named saved run settings per model, and clearer Save and Forget buttons Studio: one run settings dropdown per model, and the last setting used is what loads Oct 25, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

…ad save

Numbered names now trim the model name instead of the suffix, so a name at the length limit no longer loops forever. Saving an edited Default checks the extra arguments like saving a set does. Load no longer selects a set it failed to create.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Same 14px padding on both sides and 16px chevron as the other dropdowns, and the row trash icon hovers like the pencil instead of turning red.
…e every save

The dropdown, pencil and Reset wait until the server's saved settings are read, so picking Default cannot leave an unseen override in place. The name box's Save and Enter now hold the same readiness checks as the Save button.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen

Copy link
Copy Markdown
Member

Two reds on this PR come from its own change. Both checks are green on other PRs against the same main.

Frontend build + bundle sanity

eager startup JS: 6792.5 KB raw, 2049.8 KB transfer, 105 chunks
over the startup budget: transfer 2049.8 KB > 2047.2 KB

Main sits at 2047.0 KB transfer / 6784.6 KB raw, so the run-settings rework adds about 2.8 KB transfer / 7.9 KB raw to the eager startup chunks. Per scripts/check-bundle-budget.ts, either load the new pieces lazily or raise BUDGET in this PR with that measurement.

Chat UI Tests (extra)

The model config journey times out in step context length 4096 persists:

waiting for locator("[data-tour=\"chat-model-selector-popover\"]").first.get_by_role("button", name=re.compile(r"^(Load model|Reload model|Save settings|Forget settings)$")).first
  - locator resolved to <button disabled type="button" ...>
  116 x waiting for element to be visible, enabled and stable

After the context length is changed to 4096, the popover's action button stays disabled, so the journey can no longer load or save. The same job passes on #15232, #15233 and #15249. This PR changes the save-state logic in model-config-page.tsx / saved-run-settings.ts, so the disabled state most likely comes from there. Either the button should enable once a setting changes, or the journey needs updating to the new flow.

@danielhanchen

Copy link
Copy Markdown
Member

Repo tests (CPU, studio) finished as well. Of its 17 failures, 7 come from main: the skip-guard test, fixed by #15270, and the six ORPO tokenizer tests, which #15262 fixes. The other 10 are this PR's, all in tests/studio/test_model_picker_contracts.py, which reads the run-settings source this PR rewrites:

test_forget_settings_is_not_locked_by_unloadable_extra_args
test_only_gguf_configs_are_mirrored_to_the_server
test_run_settings_page_keeps_its_identifying_controls
test_save_settings_is_not_rendered_when_it_could_do_nothing
test_save_settings_reflects_the_context_it_pinned
test_save_settings_waits_for_gguf_classification
test_save_settings_waits_for_the_vram_budget_to_settle
test_the_run_settings_footer_does_not_reflow_under_the_pointer
test_the_settings_page_judges_the_config_storage_actually_keeps
test_the_sidebar_settings_editor_reseeds_when_the_live_config_lands

Several guard the same save-state behaviour the Chat UI journey trips on, for example test_save_settings_reflects_the_context_it_pinned. They pass on main. Each one either needs the behaviour it pins carried into the new dropdown, or an updated contract where the new design replaces it on purpose.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 25, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Saving into a setting updates the remembered record and server override of each other quant that loads with it, and deleting it forgets theirs and moves them to Default instead of leaving them to be adopted back. Selections keep the quant's own spelling so the override lands on the key the server matches first.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Writing the other quants' records can evict another model to stay inside the storage budget; its server override is now cleared the same way the current quant's save clears it.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 25, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 25, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 25, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1ef0c5b0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3692 to +3695
const wantedSet = pickedSet !== undefined ? pickedSet : (persistedSet ?? null);
const selectedEntry =
wantedSet === null ? null : findSavedRunSettings(savedSets, wantedSet);
const selectedSet = selectedEntry?.name ?? null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the draft aligned with externally changed selections

When the same model's settings are open in two browser tabs, picking a different saved setting in one tab updates persistedSet in the other through the storage subscription, but these lines switch its selected entry without applying that entry's configuration to its draft. For example, switching from Fast to Long in tab A leaves tab B displaying Long while retaining Fast's values. Save or Load in tab B then passes those stale values to saveSharedSet, overwriting Long even though the user never edited it. Reconcile external selection changes with the draft, or retain the draft's original selection until the user explicitly resolves the change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing this: it needs the same model's settings open in two tabs, and the second tab already flags it (the panel no longer matches the selected set, so its status reads Unsaved changes). Saving there stores what the panel shows, the same as other per-model settings edited in two tabs.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

…-checks them

Picking a setting now persists exactly what the panel shows, so a setting without extra arguments clears the previous flags on the server too, and it lifts a stale objection to arguments it replaced so Load and Save are not left disabled.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 25, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 25, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6d54af9c70

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 25, 2026
…acing

The dropdown labels its Default and Custom settings sections and insets its divider like the app's other menus. The footer has 18px above the dropdown, matching the space below the buttons, and the status line sits closer to the buttons.
In the chat sidebar the name box spans the width with Save and Cancel below it, the blank status line is dropped while naming, and the pencil beside the dropdown is a size smaller.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: f020cd4ac2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…aved

# Conflicts:
#	studio/frontend/scripts/check-bundle-budget.ts
@shimmyshimmer
shimmyshimmer merged commit c9ddc5a into main Oct 26, 2026
5 of 41 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-run-settings-saved branch October 26, 2026 02:57
shimmyshimmer added a commit that referenced this pull request Oct 26, 2026
…15338)

## What changes for the user

### Run settings (follow-up to #15247)

**Saved settings survive a Forget.** Forgetting a model's settings on
the API page (or the browser dropping old settings to stay under its
storage limit) now puts that quant back on Default settings. Before, the
dropdown kept the saved setting selected with default values and
"Unsaved changes", and the next Save or Load wrote those defaults over
the saved setting and every other quant using it.

**Always load with these settings.** The last setting picked is what
loads, so trying another setting once used to replace the one you wanted
every time. A checkbox under the dropdown pins a saved setting for that
model and quant:

- Every load uses it: quick select, API auto-switch and the next Load.
- Picking or loading another setting uses it once. The status reads
"Loads once. Next loads use Mine." and Save still saves that other
setting.
- Reopening Run settings on a model loaded once with another setting
shows the setting that is running.
- Reset goes back to the pinned setting, and the dropdown marks it
"Always". Unticking goes back to last-used.

**Smaller fixes in the dropdown**

- Names you type are kept. "Saved settings" and "Custom setting for
<model>" were being renamed by migration code for names that only
existed in pre-release builds of #15247.
- Hitting the 24-per-model limit says so instead of a bare "Couldn't
save".
- Deleting a saved setting asks first.
- F2 renames and Delete deletes the highlighted row, so both work from
the keyboard.
- Escape in the name box cancels the name instead of closing the whole
panel.
- An edited Default reads "Unsaved changes", not "Saved settings will be
forgotten".
- The save status and the new checkbox share one row under the dropdown,
and the unreachable Save settings / Forget settings labels left from the
Remember checkbox are gone.

### Settings load paths

- A managed account that saves settings for a model keeps its own row,
so the owner's settings no longer apply to its loads after it saved
defaults. Choosing Default settings (a forget) still inherits the
owner's row, as before.
- When the browser drops a model's settings for space, the server row
also clears its engine choice (for example vLLM, FP8) and MLX offloads,
not only the other mirrored fields. Launch flags are kept, as before.
- Startup auto-load sends the remembered GPU split, like the picker and
compare pane.
- Loading from the picker cleans stored extra arguments the way
auto-load does, so a flag Studio started managing after it was saved no
longer fails the load with a 400.

### Chat and app-wide

- Prompt queue rows are 32px instead of 48px with a mouse or trackpad.
Touch keeps 44px targets.
- Stop and pause icons are square with a small corner radius everywhere.
The stock glyphs are squircles that read as circles when filled at small
sizes.

### Settings

- API tab: "Coding agents" is now "Agents", and MCP agent access is a
row in it (with the MCP icon) instead of a separate card.
- API tab: Keyless API access is a short section with "Open in Remote &
LAN", which lands on the switches there. The API tab still reads the
setting so its examples stay right.
- API tab: Usage examples gets links to Agents, the Image and video API,
the Audio API and the Decision API, each with its icon. Image and video
sits above Audio, and the Decision API has a heading like the other API
sections.
- API tab: the API monitor has its own heading, and its auto-open toggle
is a normal settings row. Model memory's "Open in System" link matches
"Open in Agents".
- General: no divider above "Revoke all preview links".
- Jumping to a section near the end of a tab scrolls the settings pane
only; scrollIntoView also scrolled the dialog, shifting the nav.

## How it was verified

- Frontend: `npm run typecheck`, `npm test` (14000 tests, 0 failures),
`npm run build`, `npm run bundle:check` (within budget).
- Backend: `test_account_chat_settings.py` (new
`test_managed_default_save_shadows_the_owners_override`),
`test_openai_auto_switch.py`, `test_llama_compat_routes.py`,
`test_server_tuning_flags.py`,
`test_model_override_schema_compatibility.py`: 1215 passed.
`tests/studio/test_model_picker_contracts.py` and
`test_chat_autoload_failure_gate.py` pass.
- New frontend tests cover the Forget reset, kept names, the limit, the
pin (storage and panel), the eviction request body, the auto-load split
and the picker extra-args cleanup.
- Live Studio on CPU with SmolLM2-135M:
- Saved a 4096 context, forgot it on the API page, reopened Run
settings: Default settings with Save disabled, the saved setting still
at 4096, and picking it restores 4096. Before this change, one Save
wrote `null` into it.
- Pinned "Mine" (4096), saved a second setting at 2048 and loaded with
it: the model ran at 2048, the API override stayed at 4096, the
selection stayed on Mine, and reopening showed the 2048 setting with
"Loads once".
- Rename to "Saved settings", F2, Delete with confirmation and Escape
behave as above.
- Prompt queue rows measured at 32px; the stop button and every settings
change above were checked in light and dark themes.

## Not testable here

- The GPU split on auto-load (no GPUs on this host).
- The managed-account change in a live multi-account Studio (covered by
the backend test).
- Desktop builds and the in-app updater; nothing here touches them.

## Screenshots

After forgetting the model's settings on the API page, Run settings is
back on Default settings and Save is disabled (the saved setting still
holds its 4096 context):

![After
Forget](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/after_forget-56a72079f996.png)

"Mine" is pinned with Always load; the model was loaded once with
another setting, and the panel names it:

![Loaded once while another setting is
pinned](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/always_load-6aaf63e55ebb.png)

Deleting a saved setting asks first:

![Delete
confirmation](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/delete_confirm-faee60c0a8c3.png)

API tab: links under Usage examples, the Agents section with MCP access,
and the Keyless API access link:

![API
tab](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/api_tab-9bb06a58fe57.png)

Image and video above Audio, and the Decision API heading:

![Decision
API](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/decision_api-4655fecad5d3.png)

Stop icon and compact prompt queue rows:

![Stop
icon](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/stop_icon-1f82c0d94aeb.png)

![Prompt
queue](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/15338/queue-054761588d6a.png)
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