Skip to content

feat(studio): show MLX versions in Settings - #15369

Merged
danielhanchen merged 3 commits into
unslothai:mainfrom
Lyxot:feat/studio-engines-mlx-version
Oct 27, 2026
Merged

danielhanchen merged 3 commits into
unslothai:mainfrom
Lyxot:feat/studio-engines-mlx-version

Conversation

@Lyxot

@Lyxot Lyxot commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Settings > System lists llama.cpp, whisper.cpp and audio.cpp under Engines and Torch / Transformers under Environment, but says nothing about the MLX stack that runs models on Apple Silicon. When a model fails to load or behaves differently on a Mac, the MLX, mlx-lm and mlx-vlm versions are the first thing to check, and today they are only visible from a terminal.

This adds them where they belong:

  • Engines gets an MLX Version row with the core mlx version, next to the other runtimes.
  • Environment gets mlx-lm and mlx-vlm rows, next to Torch and Transformers, since they are the model libraries on top of that runtime.

All three appear only where the package is installed, so Linux and Windows hosts look exactly as before.

Screenshots

Settings > System on an Apple Silicon Mac.

Before (main) After (this PR)
Engines
Environment

Changes

  • get_package_versions() also reports mlx, so GET /api/system/hardware versions.mlx carries it. useHardwareInfo exposes it as mlx.
  • GET /api/system ml_packages also reads mlx_lm and mlx_vlm. As with torch and transformers, a missing package is omitted rather than reported as null.
  • EngineVersionsSection adds the MLX row and hides it when mlx is absent. Older backends that do not send the key also hide it.
  • EnvironmentSection renders the mlx-lm / mlx-vlm rows only when present, instead of the "Not installed" fallback Torch and Transformers use, so non-MLX hosts get no extra rows.
  • New labels (settings.about.mlxVersion, settings.resources.environment.mlxLm / mlxVlm) in every locale. Package names stay untranslated, like "llama.cpp" and "Transformers".

Design notes

  • The MLX row never carries an update offer and does not affect the "Engine updates" status. MLX is a Python dependency installed with Unsloth, not a managed engine binary, and upgrading it at runtime could desync it from the MLX integration in unsloth-zoo.
  • All versions come from package metadata without importing the packages, so the /api/system poll stays cheap.

Validation

# backend: the version keys both sections read
cd studio/backend
python -m pytest tests/test_system_ml_packages.py "tests/test_utils.py::TestGetPackageVersions" -q
# frontend: Engines / Environment wiring and locale labels
cd ../frontend
node --experimental-strip-types --test tests/about-audio-cpp-version.test.ts
# typecheck + build
npm run build
  • The tests were mutation-checked. Each of these breaks fails a test:
    • /api/system dropping or misspelling mlx_lm or mlx_vlm;
    • the hardware endpoint dropping mlx;
    • an Environment row shown unconditionally, reading the wrong package, or carrying the wrong label;
    • a locale missing a label;
    • the Engines visibility filter removed.
  • Checked live on an M3 Max: Engines shows MLX Version 0.32.4, and Environment shows mlx-lm 0.32.2 and mlx-vlm 0.7.8 (screenshots above).

Before / after

Settings > About on Linux, merge base 2b1476fcb vs head 90b3b3e52, with the same mlx 0.32.4, mlx-lm 0.32.2 and mlx-vlm 0.7.10 installed in both Studios.

Engines gains an "MLX Version" row:

Engines section before and after

Environment gains "mlx-lm" and "mlx-vlm" rows:

Environment section before and after

On a host without MLX installed none of these rows appear, so the page is unchanged there.

@Lyxot
Lyxot requested a review from danielhanchen as a code owner October 26, 2026 12:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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 ⚠️ Failed 2026-10-27T08:02:00.844926Z
We couldn’t complete this review. Comment @codex review to try again.
57b3af4 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.

Settings > System listed llama.cpp, whisper.cpp and audio.cpp under Engines and torch / transformers under Environment, but nothing about the MLX stack that runs models on Apple Silicon. Engines now has a read-only MLX row with the core mlx version (from /api/system/hardware), and Environment lists mlx-lm and mlx-vlm next to Torch and Transformers (from /api/system ml_packages). All three show only where the package is installed, so other hosts are unchanged. The MLX row never offers an update since MLX is a Python dependency, not a managed engine binary.
@Lyxot
Lyxot force-pushed the feat/studio-engines-mlx-version branch from 65a71bb to 57b3af4 Compare October 26, 2026 15:11
@Lyxot Lyxot changed the title feat(studio): show MLX, mlx-lm and mlx-vlm versions in Settings Engines feat(studio): show MLX versions in Settings Oct 26, 2026
danielhanchen added a commit that referenced this pull request Oct 26, 2026
…n logout redirect aborts it (#15398)

## Problem

`Chat UI Tests (extra)` fails intermittently in
`tests/studio/playwright_multi_account.py`, always at the same step: the
`/login` navigation right after the test logs the owner out.

```
File "tests/studio/playwright_multi_account.py", line 119, in run
    page.goto(f"{BASE_URL}/login")
playwright._impl._errors.Error: Page.goto: net::ERR_ABORTED at http://127.0.0.1:18894/login
```

Seen on #15294 (job 121303172631) and #15369 (job 121656269753). Neither
PR touches auth, and other runs of the same job pass.

## Why

`log_out()` revokes the token and clears it from `localStorage` while
the chat page is still open. The page's pending and polling requests
then get 401, and `redirectToAuth` in `features/auth/api.ts` sends the
page to `/login` itself, at the same moment the test starts its own
`/login` navigation. Whichever navigation loses is aborted, so the test
fails with `ERR_ABORTED` even though the page ends up on `/login`. A
small local reproduction with independent timings did not hit the race,
so I am not claiming the exact interleaving. The failing line and the
error match this path.

The product is right to redirect a logged-out page to `/login`. What the
test needs is to be on the login page; how it gets there doesn't matter.

## Fix

A small `open_login(page)` helper is used for the two `/login`
navigations that follow a log-out: the one at line 119 and the one
inside `login()`.

- On `ERR_ABORTED` only, it waits for the page to settle and navigates
once more.
- Any other error, or a second abort, still fails.

The assertions that follow (the username field, the setup code login and
the account isolation checks) are unchanged, so this cannot pass a page
that did not reach the login screen.

## Verification

Against a local page with Playwright's own `route.abort("aborted")`,
which produces exactly `net::ERR_ABORTED`:

| | result |
|---|---|
| plain `page.goto`, 1 abort | raises `net::ERR_ABORTED` (the CI
failure) |
| `open_login`, 1 abort | reaches `/login` |
| `open_login`, 2 aborts | raises `net::ERR_ABORTED` |
| `open_login`, no abort | reaches `/login` |

The Playwright driver guards (`test_playwright_suites_run_in_ci.py`,
`test_playwright_server_lifecycle.py`, `test_click_forced.py`,
`test_playwright_brand_labels.py`): 94 passed. ruff format and check are
clean.
@Lyxot

Lyxot commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@Lyxot

Lyxot commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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 added a commit to Etherll/unsloth that referenced this pull request Oct 27, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 27, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 27, 2026
@danielhanchen
danielhanchen merged commit a543115 into unslothai:main Oct 27, 2026
62 of 64 checks passed
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.

2 participants