Skip to content

Studio: model picker in the composer, replacing the Thinking pill - #17517

Merged
danielhanchen merged 70 commits into
mainfrom
studio-composer-model-picker
Nov 13, 2026
Merged

danielhanchen merged 70 commits into
mainfrom
studio-composer-model-picker

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Studio: model picker in the composer, replacing the Thinking pill

On Chat and New chat, this picker replaces the header model picker entirely: the header picker is gone there, and the model shortcut, the guided tour and the Model Hub's Run (Run settings) now open the composer picker. Compare's two pane pickers and the API page's model picker use it too. Images, Audio and Video keep the header picker.

The composer's Thinking pill becomes a model chip: the chosen model's logo and name, with its reasoning level beside it (for example gemma-4-E2B-it-GGUF Thinking). With nothing chosen it reads Select model with a dropdown chevron. Hovering a loaded model's logo turns it into Eject. The chip opens a compact picker for switching models and setting reasoning without leaving the chat.

The picker

  • Tabs: Favorites, Discover models, On Device, Connected models (every connection's models together, under a foldable heading per connection, with a Connections button in the search bar), one tab per maker with three or more on-device models (Google, Qwen, ...), and one per connection (OpenAI, Anthropic, ...). Connected models is there even before anything is connected (not on the API page, which serves local models only); empty, it offers Add connection, Connect coding agent (Settings > Agents, owner only), Connect ChatGPT (a new ChatGPT subscription connection) and Connect Anthropic. The last tab visited reopens; with no models on the device and no connections it opens on Discover models.
  • Search: filters the tab once typing pauses. On Discover models it searches the Hub across all uploaders, as the Model Hub's own search does, and leaves out infra models (the RAG embedder, STT and probe repos) as the header picker does.
  • On Device: every chat model on the device, grouped as the header picker groups them: Unsloth, Other models, NPU (on AMD NPU hosts), Trained, Custom folders, LM Studio and Local models, each foldable. The first group's header has the header picker's jump icons (Other models, Trained, Custom folders) beside its chevron. Custom folders can be added by path or by browsing, removed, or picked from the suggested folders, as in the header picker. With nothing on the device it says so, with a Discover models button that opens the Model hub's Discover tab. A model with one quant on disk shows it as a quant pill; several quants (a partial download counts) list under the row behind an always-visible chevron, folded or open per Settings > Chat > Expand quantizations, and the whole model can be favorited. Its quant rows drop the Downloaded and Loaded tags (a green dot marks the loaded one) and line their sizes up.
  • Discover models: on an AMD NPU host, the NPU models first (with the setup notice until the NPU is ready; picking one downloads and loads it), then the Model Hub's Recommended list, filtered by the same rule the Hub uses (the rule now lives in one shared helper, so the two cannot drift) and paged in as the list scrolls. Each row shows its parameter count (rounded as the Hub rounds it). A GGUF always opens to its full quant list, even with a quant already on disk, rather than loading that one; picking a quant downloads and loads it. Models that would struggle on this device are dimmed and carry the header picker's fit warning, right after the name; with Only show models that fit on, they are hidden, as in the Hub.
  • Quant lists: on Discover, On Device and the Quantization row, quants use the header picker's order (downloaded, then fitting largest first, then tight, then too large, with the device's recommended quant leading its tier) and its plain mono rows. The order and recommendation now live in variant-order.ts, shared by both pickers. On Discover a quant's state shows as a small tinted tag: Loaded, Downloaded, Update, Partial or Recommended, and only there are quants that do not fit faded. A failed listing shows the reason with Retry.
  • Row actions: a ⋮ menu (Favorite, Run settings, Reveal in Finder, Open model card, Delete, and a red Eject under Delete for a loaded model), a gear that opens Run settings inside the picker (the same settings page as the header picker, with Back to the list), and a star. A GGUF is only ever favorited by its quant, never as a whole repo. Favorites can be dragged into order, sharing the header picker's order.
  • Eject: with a model loaded (this chat's, or another chat's still in memory), a red Eject sits at the right end of the tab row.
  • Header picker parity: own fine-tuned and folder models can be deleted and shown in Finder; interrupted downloads stay listed as Partial and resume when picked; downloaded GGUFs show Update when a newer upload exists, with update and per-quant delete in the quant menu; Eject becomes Eject all when several models are loaded; connected models have Model settings, Model info and Copy model ID; On Device has the Recent / Size / Name sort (the active one shows an arrow, as Library's columns do; choosing it again reverses it) and the format filter in a compact menu where the Model hub button sits on other tabs, and each on-device row's menu opens with the model's quant and format (UD-Q4_K_XL GGUF), disk space, parameters and modalities, with icons scaled to one visual weight; Discover shows the Hub failure hint when Hugging Face is unreachable; MLX repos on a Mac list their variants; the chip names a model whose connection was removed, and shows the loaded format and quant (and how many models are loaded) on hover; Settings > Chat > All quantizations opens an on-device GGUF's full quant list, and the VRAM usage bar charts the chosen GGUF; picking a text-only GGUF in a chat with images still warns.
  • More header picker parity: whole-repo and NPU deletes honour the model operation lock; row and quant menus offer Reset run settings and the gear marks saved settings; arrow keys walk rows and the quants open under them; the list says Loading models until the inventory or the Hub answers; a Discover repo already on disk loads its cached copy instead of staging a download; on-device audio models (cached TTS/STT repos and audio fine-tunes) are listed with an Audio tag and a pick opens the Audio page (Compare and the API page list none); an interrupted quant beside loadable ones is listed as Partial, resumes when picked and can be deleted.
  • Fixes: on a phone-width window the panel slides back inside instead of hanging off the left edge; a Compare pane and a busy API page show a loaded row's dot as a mark rather than a dead Eject; closing the picker or switching tab cancels a quant listing still in flight, so its lone quant is not downloaded; a superseded pick no longer resets the view; the tab row's Eject passes the serving checkpoint; the shortcut and tour only open the picker when its chip is on screen, and a Compare pane's chip no longer takes the tour's model step.
  • Look: On Device groups are set apart by space rather than rules; Eject, Retry and the empty-state actions use the standard Button (Eject as the destructive variant); favorite stars are grey rather than black or white; maker and provider marks are sized by visual weight, so spiky marks (Qwen, Anthropic) match solid ones, and the outline tab glyphs are drawn at the logos' size. Tabs are sized to their icons so the gaps between them are even. Dropdown corners are concentric with their hover pills. Scrollbars are thin overlays that show only on hover, the tab strip's included, so they never take height.
  • Placement and size: the picker picks above or below once per opening (below on a new chat when there is room, above from a docked composer). Open, it is one 460px height on every tab, loaded model or not, as Zeron's picker; Run settings keep that height until Advanced settings opens (640px). Opening down on a short window, it rides up over the composer instead of shrinking. It is 420px wide.
  • Run settings in the picker: a smaller header, a tighter memory block, and rows sized to their content. The footer (settings dropdown, Always load and the save status, buttons) sits at the bottom of the panel under a rule, even when the settings are short. The full-page and sidebar Run settings keep their layout.
  • Search bar button: On Device has its sort and format menu; Discover has a menu with the same format filter and Only show models that fit; Favorites and maker tabs open the Model Hub; on Connected models and a connection tab it is a cloud button that opens Connections or that connection's settings.
  • Reasoning: models with effort levels get an Effort slider in the user's accent colour (with Off when thinking can be turned off, and a Fast mode toggle where the provider offers one); models with only on/off thinking get a Thinking switch (with a hint when no model is loaded); Preserve thinking stays where it applies, and Fast mode gets its own switch when there is no slider to hang it on. The chip drops the reasoning label while a model loads. A model with several quants on disk also gets a Quantization row.
  • Folding: the model list can be folded down to the chosen model and its reasoning controls, a plain row like Zeron's with a rule under it; Eject and the chevron sit in the same place folded and open, and the choice is remembered. The model in use keeps a hover wash one step past a hovered row's, and its loaded dot is only a mark (Eject lives in its menu and the header).

Compare and the API page

  • Compare: the two model pickers above the panes are the new picker. Each shows and sets its own pane's model and closes on a pick; there are no reasoning controls or Eject, since the panes load on send. The left pane's picker opens to the right, clear of the sidebar.
  • API page: Load models is the new picker, with Eject and Eject all for the served model and the page's own load and download flow. No reasoning controls or connection tabs, as the API serves local models only.
  • The header picker drops the options only Chat, Compare and the API page passed (run settings handoff, selected config, fine-tuned models, folders and delete hooks, several-loaded labels, sizes and the cloud indicator). Images, Audio and Video pass none of them and are unchanged.

Rows re-render only when their own data changes, so On Device with 600 models stays responsive (playwright_model_picker_renders.py now measures this picker); arrow keys move between focused rows. All model switches go through the chat page's existing handleCheckpointChange, so load, adopt and cancel behaviour is unchanged. The reasoning logic moves from the old ReasoningToggle into useComposerReasoning. Compare mode's shared composer keeps its own controls.

New chat

The composer is centred on the page by its own box, with the greeting 16px above it, instead of moving with the greeting. The default position is now 40% of the page, a little above the middle, so a picker opening downward has room; anyone who already chose a position keeps it.

Header model picker

  • Pins become Favorites (star), and the two pickers read and write the same list.
  • Row actions show ⋮ before the gear, and Eject moves under Delete in red.
  • On a Mac, Recommended no longer lists FP8, NVFP4, GPTQ or AWQ checkpoints, which need an NVIDIA GPU; Mac-native models and plain safetensors are unchanged.
  • Run settings, then Back, no longer leaves the panel wider than its content.
  • The fit warning table moves to fit-verdict.ts so both pickers share it.
  • Its quant order and recommendation come from variant-order.ts, unchanged in behaviour.

Also: Anthropic connections use Anthropic's transparent mark instead of the wordmark tile, and the Filters glyph is centred in its button (it sat up to 1.5px low) in the Model Hub, Library, Chats, Scheduled tasks, the browser's internal pages and Data settings.

CI drivers

The composer picker carries the header picker's data-model-picker-option, data-model-picker-active-option, data-model-picker-search-input and data-model-picker-list hooks, so the Playwright drivers find it. The area matrix (_area_matrix.py), studiobench (dom.js, actions.py, surfaces.py), playwright_model_config.py, playwright_memory_estimate.py and playwright_model_picker_renders.py now open Chat's picker through the composer chip, and the Python source contracts that named the old Thinking pill or header trigger check the composer instead.

Verification

  • npm run typecheck, npm run build, npm test (15738 pass, 0 fail). New tests/composer-model-picker.test.ts covers rows, tabs, favorites keys, quant choice, the empty-state rule, the settings wiring and the reasoning controls; tests/variant-order.test.ts covers the shared quant order; tests/hub-recommended-format.test.ts covers the Mac checkpoint rule and the shared Recommended rule.
  • Locally against an isolated Studio: playwright_model_config.py and playwright_memory_estimate.py pass, the long-thread area matrix passes with the model picker area measured, and playwright_model_picker_renders.py passes (1350 row renders while 600 quant probes settle, 100 while typing). The picker contracts in tests/studio pass.
  • An isolated Studio on an Apple Silicon Mac (a GGUF-only install, so it runs as CPU) driven in a browser: picked and switched models from On Device, browsed and paged Discover models, opened a GGUF's quants, searched the Hub, starred and reordered favorites, opened Run settings and came back, checked the hub and connection buttons, the fit warnings, and the Effort slider in both reduced and full motion; toggled Only show models that fit (Discover 233 to 172 rows here); confirmed a Discover GGUF with a quant on disk opens all 21 quants without loading.

Not tested here

  • Audio picks and partial quants beside complete ones (no audio model and no such repo on this host), and the Compare, API page, delete lock, cancelled listing and hidden chip fixes, which are covered by tests and reading only.
  • Sending through a connected provider (no API keys on this host).
  • Downloading a model end to end from Discover models, and a model with several quants already on disk (each model here has one), so Expand quantizations was checked in code and tests only.
  • The VRAM usage bar, which draws nothing on Apple or shared-memory GPUs.
  • The fit warnings with a real GPU, and the Mac checkpoint rule on a host Studio detects as a Mac GPU.

Before / after

Chat with a connected model selected, merge base c07cb25e0 (left) vs this PR (right). The picker leaves the header and becomes a model chip in the composer:

Chat page before and after

The picker opened: the header popover with Recommended / On Device / Connected (left) becomes the composer panel with Favorites, Discover models, On Device, Connected models and one tab per connection (right):

Model picker open, before and after

Run settings now open inside the composer picker, and on Chat and New
chat the composer picker is the only model picker: the shortcut, the
guided tour and the Model Hub's Run open it. On Device groups models as
the header picker does (Unsloth, Other models, NPU, Fine-tuned, Custom
folders, LM Studio, Local models), with custom folder management, and
Discover lists NPU models on AMD NPU hosts. Images, Audio and Compare
keep the header picker.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T18:00:19.533679Z 8c9780f 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.

- A quant still resolving no longer overrides a newer pick.
- Search keeps MLX and plain safetensors repos on a Mac, as the header
  picker did.
- On-disk quant lists are re-read on each opening and inventory change,
  so a newly downloaded quant shows; a failed read no longer sticks.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

… model settings

- A resident with no on-disk row is keyed, picked and ejected by its
  serving checkpoint, so two loaded files sharing a name stay separate.
- Connected model rows get a gear and menu that open Model settings
  (system prompt, output cap, effort pin), as the header picker did.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

…uants

- Quant listings send the user's HF token, so gated and private repos
  list their quants as search lists the repos.
- A download offer keeps partial quants so an interrupted download can
  resume; only local load choices drop them.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 9450b967c3

ℹ️ 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".

@danielhanchen

Copy link
Copy Markdown
Member

Frontend build + bundle sanity fails in the long-chat gate's area matrix, because the model picker moved:

FAIL: 1 popup trigger(s) on the chat page belong to no measured area: popover-trigger:Model: Qwen3-4B. Add an area for each to AREAS in tests/studio/_area_matrix.py (or to NOT_AREAS with the reason)
FAIL: area model_picker (default, 40 turns): NOT_RUN: control not found: the area no longer runs on the default page (renamed control or changed predicate? update AREAS in tests/studio/_area_matrix.py)
FAIL: area model_picker (default, 200 turns): NOT_RUN: control not found: ...

The model_picker entry in AREAS (tests/studio/_area_matrix.py, around line 370) still opens button.unsloth-model-selector-trigger and covers the triggers popover-trigger:Select model and popover-trigger:Qwen3-4B. With the picker now in the composer, that button is gone and the new trigger is labelled Model: Qwen3-4B.

Pointing open at the composer's model trigger and adding popover-trigger:Model: {name} to covers should let the gate measure the new picker the same way, so a regression in it still shows up.

- Fine-tuned and folder models can be deleted and shown in Finder.
- Interrupted downloads stay listed as Partial and resume when picked.
- Downloaded GGUFs offer Update, with update and per-quant delete in
  the quant menu.
- Eject becomes Eject all when several models are loaded.
- Connected models get Model info and Copy model ID.
- On Device gets the Recent / Size / Name / Downloaded sort and the
  format filter, in a compact menu in place of the Model hub button.
- On-device row menus open with the model's format, quant, size,
  parameters, modalities and source.
- Discover shows the Hub failure hint; MLX repos list their variants on
  a Mac; a model whose connection was removed keeps its name; the chip
  shows the loaded format and quant on hover.
- Run settings use tighter sides with the scrollbar at the edge; On
  Device groups are set apart by space; the collapsed bar gets a red
  Eject pill and a hover circle on its chevron; Qwen and Anthropic marks
  are scaled to match the other logos' weight.
…d icons

The Supports line in an on-device row's menu marks each capability with
the Model Hub's own icon and colour, spaced rather than comma-separated.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

- An MLX variant's Run settings gear keeps the MLX format, as its pick
  does, so the page shows MLX controls.
- A fine-tuned GGUF export's quants get a menu with per-quant delete
  through the fine-tune endpoint, as the header picker had.
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: b19811b4da

ℹ️ 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-only: drops comments that restate the code and shortens the rest.
The Supports line reads the backend's own flags (vision, audio and video
input, speech) before the name-based guess, and lists text, inputs,
speech, then reasoning, tools, code, image or video generation and
embeddings.
…ings sides

- Every modality in the details menu uses a Model Hub glyph: text as
  Conversational, video as the Video gen slate, speech as Audio.
- Run settings use the header picker's side padding again.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

The sides no longer reserve the scrollbar's gutter, so the page sits
centred; the floating scrollbar moves flush to the panel's right edge.
- The picker caps its height: the model list at about eight and a half
  rows, the whole panel (Run settings included) at 520px.
- Run settings no longer rubber-band past their end, and the scrollbar
  stops at the top of the pinned footer.
- On Device's sort and filter button uses the Model Hub's Filters icon.
- Discover opens at its top rather than scrolled to the chosen model.
- Run settings sections sit closer together in the composer.
- The row menus' scrollbar runs at the menu's edge without eating into
  its padding.
- The list and panel height caps are a little more lenient.
- The row ⋮ hover circle centres on the glyph's ink.
@unslothai unslothai deleted a comment from shimmyshimmer Nov 13, 2026
@unslothai unslothai deleted a comment from shimmyshimmer Nov 13, 2026
@unslothai unslothai deleted a comment from shimmyshimmer Nov 13, 2026
@unslothai unslothai deleted a comment from shimmyshimmer Nov 13, 2026
@unslothai unslothai deleted a comment from shimmyshimmer Nov 13, 2026
@unslothai unslothai deleted a comment from shimmyshimmer Nov 13, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: ad5baa7466

ℹ️ 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".

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 83be686b44

ℹ️ 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".

…-picker

# Conflicts:
#	studio/frontend/src/features/chat/external-providers.ts

[skip ci]
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 8c9780f51a

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants