Repository navigation
Unsloth Studio / Desktop: model picker org filters get their own row, filter Discover and On Device, and can be chosen in Settings - #18108
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
# Conflicts: # studio/frontend/src/components/assistant-ui/composer-model-picker/composer-model-picker.tsx # studio/frontend/tests/composer-model-picker.test.ts
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ca4dcf7dd
ℹ️ 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".
| isFavorite, | ||
| hubAnswered ? (row) => row.kind === "hub" : undefined, | ||
| ), | ||
| orgFilterApplies(viewed) ? orgFilter : null, |
There was a problem hiding this comment.
Count organization-filtered results when auto-paging Discover
When an org has few or no Discover matches, this filter leaves the paging sentinel visible, but useHubInfiniteScroll still receives the unfiltered hubResults.length as resultCount. Each unrelated page therefore triggers resolveInfiniteScrollProgress's visible-results branch and resets the 40-fetch safety cap, so selecting that org can automatically drain the entire unscoped Hub listing and accumulate its hidden results without scrolling. Pass the organization-filtered visible count to the paging hook, or scope the Hub request by org, so nonmatching pages cannot continually reset the cap.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 333fa1f: under an org filter the paging hook now counts only the Hub rows the filter shows, and the reset key includes the org, so hidden pages no longer reset the fetch cap.
…ker-org-row # Conflicts: # studio/frontend/src/components/assistant-ui/composer-model-picker/picker-model.ts # studio/frontend/tests/composer-model-picker.test.ts
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
## Summary The whole-tree "Duplicate definitions" step in Lint CI fails on main: ``` duplicate definitions (1): unsloth/kernels/dequant_cache.py:740: _ is defined twice (def at line 721, def here) ``` Every PR's source lint job inherits this (for example the staging runs for #17742 and #18108, both on current main). ## Cause #18285 registers fake (meta) kernels for its two custom ops with the idiom the torch.library docs use: ```python @torch.library.register_fake("unsloth::nf4_cached_matmul", lib = _LIB) def _(X, W, ...): ... @torch.library.register_fake("unsloth::nf4_cached_addmm_", lib = _LIB) def _(out, X, W, ...): ... ``` That code is correct. The decorator keeps a reference to each function, and the name `_` is never read back, so neither copy is dead. `lint_duplicate_definitions.py` exists to catch a second copy that silently replaces the first, which is not what happens here. The lint is too broad for this case. ## Fix In `scripts/lint_duplicate_definitions.py`, a `def _` that has at least one decorator binds nothing. This covers `register_fake`, `singledispatch`'s `@f.register def _`, and similar registration hooks. The exemption is deliberately narrow: - An undecorated `def _` defined twice is still a finding. - Any other decorated name defined twice is still a finding. Two self-test cases pin both sides. The docstring's list of carve-outs documents it. ## Verification - `--self-test`: 65 cases pass. With the exemption removed, the new decorated `_` case fails (`self-test FAILED (1 case(s))`). - Whole tree (`unsloth unsloth_cli studio scripts tests cli.py unsloth-cli.py`): `clean: 6105 file(s) checked`. On main the only finding was the one above, so the exemption hides nothing else. - `tests/test_lint_duplicate_definitions.py`: 12 passed. ruff is clean.
|
Pushed
Typecheck and the frontend suite pass (16706 tests). @codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Pushed
Typecheck, the frontend suite and @codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…m to their own row
# Conflicts: # studio/frontend/src/components/assistant-ui/composer-model-picker/composer-model-picker.tsx # studio/frontend/src/features/chat/stores/chat-runtime-store.ts # studio/frontend/src/features/settings/tabs/chat-tab.tsx
The org tabs (Google, Meta, Qwen, ...) used to sit in the same row as Favorites / Discover / On Device / Cloud, and they only listed models already on the device. They're now on/off filters (
aria-pressed) that narrow whichever of Discover or On Device is open. By default they sit in the tab bar after a divider, where the org tabs were. A setting drops them to their own row under the sources.What changed
Shown on Discover and On Device only, not on Favorites or Cloud. Drag reorders the filters. When their own row overflows, it scrolls sideways on a mouse wheel and fades its clipped ends. Changing the org cancels an unresolved Discover pick and resets the keyboard highlight, the same as a tab change. Discover auto-paging counts only the rows the filter keeps.
Filtering is strict. A row's org comes from the repo itself, never from a fine-tune's base model:
google/gemma-*andgoogle/flan-t5-smallare Google). A short alias list covers orgs whose Hugging Face name differs (ibm-granite,CohereLabs,HuggingFaceTB,MiniMaxAI).So
bartowski/gemma-*or a local LoRA of Gemma never lists under Google. A row's logo still follows its base model, as before.Choose organizations (Settings > Chat > Model selection, off by default). Off, the picker suggests orgs as it does today: any org with 3+ models on device. On, every known org is a toggle and the picker shows exactly the ones picked. The setting is saved as
unsloth_chat_picker_orgs.Organizations in the tab bar (same section, on by default). Turned off, the filters move out of the source tab bar onto their own row under the sources. Both placements render the same buttons. The setting is saved as
unsloth_chat_picker_orgs_in_tab_bar.New orgs: FastFlowLM and AMD. Their logos come from their Hugging Face org avatars, redrawn as marks in the theme colour so they stay readable at tab size.
Both settings are cleared by the settings reset and have strings in all 25 locales. This includes what was #18109.
Configurations
Unsloth Studio (web) on macOS (Apple M5), headless Chromium at 1280x800, models from the Mac's Hugging Face cache. Picked orgs: Qwen, Google, NVIDIA, AMD and FastFlowLM. Before is main
f3f977904c. Every configuration shot is at774d083, this head (main merged in). This Mac has no NPU and no AMD or FastFlowLM models, so those two filters show but have nothing to list here.unsloth/gemma-*plusgoogle/flan-t5-smallTests
filterByOrg,orgFilterAppliesandownerOrgIdcover the attribution cases.774d083: typecheck passes, the frontend suite passes, andi18n:check:strictis clean.Before / after (merge base
3a6bc50da7vs head333fa1f22f, two isolated Studio installs, headless Chromium)Six Qwen-owned repos (
Qwen/*andunsloth/Qwen*) plus two controls (HuggingFaceTB/SmolLM2-135M-Instruct,trl-internal-testing/tiny-Qwen3ForCausalLM) on device in both homes.On Device, Qwen pressed: main shows Qwen as a fifth source tab with only the 3

unsloth/re-uploads; this PR puts Qwen on its own row and keeps all 6 Qwen repos, dropping both controls.Discover, Qwen pressed: this PR narrows Discover to Qwen-owned repos; main has no org filter on Discover.

Choose organizations = Google, Qwen: exactly those two chips.

Settings: the new switch, on, with the org toggles below it.

Staging CI (Studio regression journeys, base vs head): ubuntu NO_REGRESSION, windows-latest NO_REGRESSION, macos-15 NO_REGRESSION (re-run after the first macOS runner was never acquired). The only intended Settings change is the new Choose organizations row.
Studio UI regression check
Base
3a6bc50davs head333fa1f22. Functional: NO_REGRESSION, UI coverage 84%, 8 visual change(s), 5 text-only change(s). Only steps whose screenshots differ are shown.crawl/r_images

Facts:
inventory: {'before': ['link:Unsloth home', 'button:Search', 'button:Close sidebar', 'button:New chat', 'button:Model hub', 'button:Library', 'button:Images', 'button:Create', 'button:Edit', 'button:Transform', 'button:Inpaint', 'button:Extend', 'button:Upscale', 'button:Reference', 'button:More', 'button:Projects', 'button:New project', 'button:Organize projects', 'button:Recents', 'button:Organize chats', 'button:Unsloth account menu', 'button:Settings', 'separator:Resize or collapse sidebar', 'separator:Resize settings panel', 'button:Select image model', 'tab:Create', 'tab:Train', 'button:Use via API', 'button:Video', 'button:Manage image generation presets', 'button:Negative prompt', 'button:More info', 'combobox:Aspect ratio', 'button:Flip width and height', 'button:Width presets', 'button:Height presets', 'button:Advanced'], 'after': ['link:Unsloth home', 'button:Search', 'button:Close sidebar', 'button:New chat', 'button:Model hub', 'button:Library', 'button:Images', 'button:Create', 'button:Edit', 'button:Transform', 'button:Inpaint', 'button:Extend', 'button:Upscale', 'button:Reference', 'button:More', 'button:Projects', 'button:New project', 'button:Organize projects', 'button:Recents', 'button:Organize chats', 'button:Unsloth account menu', 'button:Settings', 'separator:Resize or collapse sidebar', 'separator:Resize settings panel', 'button:Select image model', 'tab:Create', 'tab:Train', 'button:Use via API', 'button:Video', 'button:Negative prompt', 'button:More info', 'combobox:Aspect ratio', 'button:Flip width and height', 'button:Width presets', 'button:Height presets', 'button:Advanced']}desktop/s02_backend_ready

desktop/s03_route_chat

desktop/s05_route_images

desktop/s06_route_studio

desktop/s08_settings

desktop/s09_update_banner

desktop/s10_ipc

settings/s05_tab_chatsettings/s20_toggle_persistsettings/s21_reload_persistedcrawl/r_hubcrawl/r_projects