Repository navigation
Studio: simpler API usage examples, and no Pi / Mistral Vibe outbound links - #14914
Conversation
Removes the Pi (pi.dev) and Mistral Vibe (github.com/mistralai) chips from the agent Setup docs row, and points both agents' Docs link in Settings > Agents at the unsloth start page.
Language, Request and Platform dropdowns replace the nine example pills and the OS pills; the coding agent pills become an Agent dropdown with icons, an Installed badge and a per-agent Docs link, which replaces the Setup docs row.
Codex Review SummaryThis 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. 🎉 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". |
…ommand beside its picker Platform is a two-way toggle that starts on the machine the user is on (deviceType on loopback, else the browser platform) until they pick one. The coding agents block drops its second title, puts the command to the right of the agent picker, and its link now opens the Agents tab on the picked agent.
|
Codex Review: Didn't find any major issues. Delightful! 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". |
… agent list The command returns to full width below the agent dropdown, the list caps at seven rows and scrolls like the Agents tab, and Open in Agents carries that tab's bot icon.
|
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". |
Drops the 80px minimum width that left extra space either side of Start.
|
Codex Review: Didn't find any major issues. Another round soon, 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". |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
…gents Agents is an owner-only settings tab, so for other accounts the button landed on General and left no route to setup docs.
…odel is loaded Without a model the example disappeared, so the Language, Request and Platform pickers changed nothing visible.
Remote & LAN is the next tab down, so the summary card duplicated it. Removes the now unused RemoteLanSummary component and its tests.
|
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". |
…on-only copy Longer examples start at the height of the basic curl one, fade out, and expand to their full length. The copy button drops its Copy label.
Request (or Images / Video) and Language share the first header row beside the copy button, and Platform is the row under it, in the pill style the usage examples had before.
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
…o as toggles What the example does is a toggle again; Language and Platform keep the old pills, with Platform at the right end of the same row beside the copy button.
|
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". |
The code box header keeps only the Language and Platform pills.
…l-links # Conflicts: # studio/frontend/src/features/settings/components/audio-api-examples.tsx # studio/frontend/src/features/settings/components/media-api-examples.tsx # studio/frontend/src/features/settings/components/remote-lan-summary.tsx # studio/frontend/src/features/settings/components/usage-examples.tsx # studio/frontend/tests/settings-code-boxes.test.ts
|
Codex Review: Didn't find any major issues. Delightful! 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". |
…ollbars The rounded scroller cut the top of its vertical scrollbar off under the header; it is square now and the box clips the scrollbar ends at its corners. The scrollbars show only while the code is hovered, and the header row drops the extra height the toggle used to need.
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
…ivider The copy icon moves into the code area beside the first line, and the line under the Language and Platform pills goes.
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
… header The copy icon rides in the scroller on the first code line, so it scrolls up with the code while staying at the right edge sideways, and code scrolling up fades out under the pill row instead of being cut.
|
@codex review |
|
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". |
Keeps the fade under the pill row; the copy icon goes back to a fixed spot on the first line instead of scrolling with the code.
|
@codex review |
|
@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". |
Four checks fail on `main` (fd924a5), so every open PR inherits them. Each was reproduced on a clean `main` worktree and attributed. A fifth, `test_every_resolver_probe_forwards_the_trust_decision`, was fixed on `main` by #14990 in the meantime, so this PR takes that version. | Check | Introduced by | Wrong side | Fix | |---|---|---|---| | `studio/backend/tests/test_text_io_encoding.py::test_text_io_names_its_encoding[_xpu_triton_toolchain.py]` | #14814 | Product | The `vswhere` call used `text=True` with no encoding, so it decoded with the locale code page. A Visual Studio install path with non-ASCII characters would garble. It now passes `-utf8` to vswhere and decodes as UTF-8 (`errors="replace"`). | | `tests/python/test_accelerator_skip_guards.py::test_no_skip_guard_reads_a_spoofable_accelerator_probe` | 0947723 | Test | `test_packed_fp32_cuda_parity` skipped on `torch.cuda.is_available()`, which the CPU CI spoof answers True. It is now gated on `has_real_cuda()`, same as the sibling attention tests. | | `tests/studio/test_usage_examples_model_source_contract.py::test_examples_never_print_a_hardcoded_model_id` | #14914 | Test | #14914 deliberately renders the example with a `YOUR_MODEL` placeholder when nothing is servable, instead of hiding it. The test still asserted the old "no snippet" shape. | | `tests/test_fp8_pre_sm89_byte_dequant.py::test_kill_switch_env_is_read_at_import` | #14936 | Test | The subprocess imports `unsloth` in a fresh interpreter that has no conftest spoof, so on CPU CI the import raised "cannot find any torch accelerator" before the switch was read. With no GPU, the subprocess now applies `tests/_zoo_aggressive_cuda_spoof.py`, the same pattern `test_qat_phone_deployment.py` uses. It now checks both `0` and `1`. | For the third check, the invariant is unchanged: no hardcoded `unsloth/...` id and no `MODEL_FALLBACK`. The test now also pins the new contract: - the placeholder constant - the `model ?? MODEL_PLACEHOLDER` call as the only `buildSnippets` call site - the no-model note rendering exactly when the placeholder is shown ## Verification - On `main` before #14990: 4 failed in `tests/` and 1 failed in `studio/backend/tests`. - On this branch: `test_accelerator_skip_guards.py`, `test_usage_examples_model_source_contract.py` and `test_attention_packed_fp32_routing.py` give 48 passed, 1 skipped. With the two new files and `test_audio_load_routing.py` added, the run gives 94 passed, 133 skipped. `test_text_io_encoding.py` and `test_xpu_triton_toolchain_14807.py` give 904 passed. - Sabotage check: hardcoding `_HIP_FP8_BYTES_DEQUANT = True` fails the kill-switch test. - Sabotage check: both edits below make the updated contract test fail. - Changing the placeholder to `"unsloth/Qwen3-4B"`. - Dropping the `model ? null :` gate on the note.
Studio: simpler API usage examples, and no Pi / Mistral Vibe outbound links
Settings > API > Usage examples had three rows of pills (nine example types, two platforms, nine agents) plus a "Setup docs:" row of links. It now has a Request toggle above a code box whose one header row holds the Language pills and, at its right end, the Platform pills, plus an agent picker laid out like Settings > Agents.
What changes for users
YOUR_MODELplaceholder under the existing "load a model" note, instead of disappearing, so the pickers always visibly change it.api-example-parts.tsx.RemoteLanSummarycomponent and its tests go with it. The card was also what re-read a tunnel still starting and published its URL to the examples, so that moves to a headless owner-only hook (usePublishAccessUrls).unsloth.ai/docs/integrations/unsloth-start, already the fallback for agents without their own page.Verification
npm run typecheck,npm test(13,704 pass),npm run buildinstudio/frontend.npm run biome:checkreports the same repo-wide errors asmain; the changed file formats clean.tests/agent-docs-links.test.ts: Pi and Mistral Vibe docs resolve to the unsloth start page, the API tab hands its agent to the Agents tab with no hardcoded external URLs, and the platform default follows the user's machine until they pick one.install.sh --localStudio on this branch, driven with Playwright in light and dark: the dropdowns switch the snippet (Python + With tools shows the tool-enabled example), picking Pi givesunsloth start pi, and "Open in Agents" lands on the Agents tab with Pi selected. The screenshot with a code sample stubs/v1/modelswith one loaded model, since this CPU host has none loaded.Not tested here
Desktop builds were not run; the change is frontend-only.