Skip to content

Stop unsloth start claude from opening with a model it cannot use - #10089

Merged
danielhanchen merged 16 commits into
unslothai:mainfrom
NilayYadav:start-claude-gguf-gate
Sep 1, 2026
Merged

danielhanchen merged 16 commits into
unslothai:mainfrom
NilayYadav:start-claude-gguf-gate

Conversation

@NilayYadav

@NilayYadav NilayYadav commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

If you have a normal safetensors model loaded and run unsloth start claude, the command prints "Unsloth ready" and opens Claude Code. Every message then fails, because the messages endpoint only works with GGUF models. Claude Code treats the failure as a temporary server problem and keeps retrying, so you get a spinner and no answer. In testing it retried 8 times over 75 seconds and never gave up.

unsloth start codex already checks for this and refuses before it opens anything:

Codex needs a GGUF model served by llama-server, but unsloth/gemma-3-4b-it is not one.
Try: unsloth start codex --model unsloth/gemma-3-4b-it-GGUF

This makes claude do the same. The three checks Codex already runs now take the agent name as an argument so both commands can share them. Codex's wording and behaviour are unchanged.

opencode does not need this. It is set up as an OpenAI compatible provider and talks to /v1/chat/completions, which serves safetensors and MLX models fine. Only the Claude Code and Codex endpoints require GGUF.

How to check: load a non GGUF model, run unsloth start claude, and see it refuse instead of opening.

@danielhanchen

Copy link
Copy Markdown
Member

Confirmed main only gates this on the codex path in unsloth_cli/commands/start.py, so unsloth start claude still opens on a safetensors model and every message then hangs on retries. Will get this reviewed.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

danielhanchen added 2 commits September 1, 2026 03:21
…in the picker

The helper rename in unslothai#10089 left unsloth_cli/tests/test_start.py calling the
old Codex-specific names, so 71 tests failed with AttributeError and one still
asserted that unsloth start claude accepts a non-GGUF model.

- Migrate every caller to _preflight_agent_gguf / _attach_gguf_check /
  _fail_agent_needs_gguf with _CODEX_GGUF_AGENT, no behaviour change.
- Turn the stale claude-accepts-non-GGUF assertion into a both-agents rejection
  test, with opencode as the control that must keep working.
- Fold the new Claude cases into the CLI suite next to the Codex matrix, and
  replace the inspect.getsource wiring test with tests that drive the command:
  the preflight refuses before a server starts, the attach gate refuses before
  an evicting load, and a post-connect refusal tears down only a server this
  command started.
- Treat claude as GGUF-only in the API examples agent picker too, so a
  safetensors model is no longer offered a command the CLI now rejects.
- Restore the comment clause the rename dropped in _preflight_agent_gguf.
Follow-up to the Claude gate. Three things a differential simulation of the
merge base against this branch turned up.

_require_gguf_for_agent only failed open on a literal 404. A 401/403, any 5xx,
a connection refused, a timeout or a non-JSON body all blocked the launch, and
the last three surfaced as a raw traceback because only HTTPError was caught.
Both callers wrap it in "except BaseException: _shutdown_auto_served()", so a
transient blip tore down a server that had just finished loading a GGUF. The
status route wraps its own llama.cpp and release probes in "except Exception:
500 Failed to get status", so a 500 is routinely raised with a healthy GGUF
resident: it is not evidence about the model. Now only is_gguf present and
false rejects. A body without the key is unknown too, which is what a Studio
old enough to answer an unknown /api/* with 200 rather than 404 sends; it used
to be read as a definite no and produced a wrong message about the user's
model. A current server always sends the key explicitly, so nothing changes
there.

The API examples picker honoured a stored agent even when it could not run.
agentPickedByUserRef is true whenever anything was persisted, so a preference
saved before Claude Code was gated on GGUF short-circuited the check and kept
offering a command the CLI now refuses. A restored pick that cannot run is now
corrected and dropped; a pick made by hand in the same session still wins.

The auto-pick guard was also wrong: an empty detected list means both "still
fetching" and "nothing installed", so acting on it flipped the shown command
between paints. It now waits for detection to answer, the same way the fetch
effect does, and keeps its answer inside the agents the panel actually offers.

Tests: 27 cases covering one gate branch each, and an exhaustive sweep of the
picker's 320 reachable states asserting it settles, settles somewhere runnable
and offered, and differs from the old rule only where the old answer could not
run.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-09-01T08:09:06.397157Z aa585ca New commits
🔒 Security Review ✅ Completed 2026-09-01T04:37:05.834019Z 646893b 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.

@danielhanchen

Copy link
Copy Markdown
Member

Reviewed this properly and pushed two commits to the branch. The change is right and worth landing. Summary of what I checked and what I changed.

The issue is real

anthropic_messages in studio/backend/routes/inference.py only ever reads get_llama_cpp_backend(). With nothing loaded it 503s "No GGUF model loaded", it auto-switches with gguf_only = True which 400s "This endpoint serves GGUF models only", and after the switch it 503s again if the llama backend still is not loaded. There is no path through /v1/messages that a transformers or MLX model can serve. _claude_local_env sets ANTHROPIC_BASE_URL, so every Claude Code request lands there.

Leaving opencode alone is correct: it speaks /v1/chat/completions, which does serve safetensors and MLX.

Worth noting the status quo was actively steering people into this. Before the PR, the API examples panel auto-picked with detectedAgents.find((a) => a !== "codex" || isGguf) and fell back to DEFAULT_AGENT = "claude", so with an MLX or safetensors model loaded Studio recommended unsloth start claude. That in-app suggestion was the only place anything told a user to do this. No README, doc or notebook does.

Before and after

Situation Before After
claude, hub repo with a complete GGUF-free listing starts a server, loads, opens Claude Code, every message retries forever refuses before any server starts, names the -GGUF sibling
claude, attach to a running server, request a non-GGUF model evicts the resident model, then hangs refuses before the evicting load, resident model survives
claude, server already serving safetensors or MLX opens, hangs refuses, tears down only a server this command started
claude, any GGUF works unchanged
codex works byte-identical wording and behaviour
opencode, openclaw, hermes works untouched

What I pushed

1. The existing test suite was broken. The helper renames never reached unsloth_cli/tests/test_start.py, which still called the old names 102 times: 71 failures, and one test that asserted the exact opposite of this PR (claude --no-launch exits 0 on is_gguf: false). That is the red "Repo tests (CPU)" and "(Python 3.13)". Migrated every caller, rewrote that test to cover both agents with opencode as the control that must keep working, folded the new Claude cases into the CLI suite next to the Codex matrix, and replaced the inspect.getsource wiring test with tests that drive the command: the preflight refuses before a server starts, the attach gate refuses before an evicting load, and a post-connect refusal tears down only a server this command started. Removing each gate individually now fails a specific named test.

2. _require_gguf_for_agent failed closed on "could not ask". Only a literal 404 failed open. A 401/403, any 5xx, connection refused, a timeout or a non-JSON body all blocked the launch, and the last three came out as a raw Python traceback because only HTTPError was caught. Since both callers wrap it in except BaseException: _shutdown_auto_served(), a transient blip tore down a server that had just finished a long GGUF load. This matters because get_status wraps its own llama.cpp and release probes in except Exception: 500 "Failed to get status", so a 500 is routinely raised with a healthy GGUF resident. It is not evidence about the model.

Now only is_gguf present and false rejects. A body without the key is unknown too, which is what a Studio older than the /api/* 404 change sends (it answers 200 {"error": "API endpoint not found"}), and which used to produce a wrong "needs a GGUF model" message. A current server always sends the key explicitly, so nothing changes for one.

3. The frontend picker. usage-examples.tsx filtered only codex out of auto-selection, so a safetensors user was still offered unsloth start claude. Added a shared GGUF_ONLY_AGENTS predicate. Two further things fell out: a preference persisted from an older Studio bypassed the check entirely (agentPickedByUserRef is true merely because something was stored), and an empty detected list means both "still fetching" and "nothing installed", so acting on it flipped the shown command between paints. A restored pick that cannot run is now corrected and dropped, a click made in the same session still wins, and the auto-pick waits for detection to answer.

Simulation

Black-box differential: the same 422-cell matrix driven through the real Typer app with all HTTP, filesystem and subprocess calls stubbed, run against the merge base, the PR head and this branch in an isolated uv venv, then diffed cell by cell. Axes: 5 agents, 12 model kinds (hub GGUF, hub GGUF with quant, safetensors, MLX, local .gguf, local .GGUF, directory with and without a GGUF, complete and torn split shards, missing path, resident-only), 4 server states, 5 flag shapes, 9 server health shapes, 4 platforms, 4 accelerators.

Merge base to this branch:

  • 371 of 422 cells unchanged, 51 changed, zero unexpected
  • 30 newly refused, every one of them claude with a non-GGUF target
  • opencode (78 cells), openclaw (66) and hermes (66): 0 changed
  • 49 claude-with-a-GGUF cells: 0 wrongly refused
  • raw tracebacks: 5 to 0 (all five were codex hitting the fail-closed paths above)
  • the 14 cells where claude gains the missing-path and torn-shard validation are byte-identical to what codex already did on the merge base, so that is parity, not new behaviour

PR head to this branch: 408 of 422 unchanged, all 14 changes are the tolerance fix.

Old installs. Both /api/inference/status with is_gguf and /api/models/gguf-variants date to the same commit that added GGUF support, so "old install lacks the route" is not a real risk. I pulled the released unsloth 2026.8.22 wheel off PyPI and confirmed its CLI has no Claude gating at all, so an old CLI behaves exactly like the merge base column above. New CLI against an old server is covered by the 9 server-health shapes.

Platforms. Linux, macOS, Windows (via the suite's existing _simulate_windows) and WSL, including a C:\... path read from WSL. 28 cells, claude and codex identical in every one. I did not find a doc, notebook or workflow that tells Mac or MLX users to run unsloth start claude.

Hardware. No GPU coupling exists to break: start.py contains zero references to torch, CUDA, ROCm or MPS, and the only GPU-adjacent things are --tensor-parallel and --gpu-memory-mode, which are forwarded to the server command line and never inspected. I still measured it rather than asserting it: the matrix injects real CUDA_VISIBLE_DEVICES / HIP_VISIBLE_DEVICES / ROCR_VISIBLE_DEVICES / PYTORCH_ROCM_ARCH / PYTORCH_ENABLE_MPS_FALLBACK environments and a matching fake torch for NVIDIA, AMD ROCm, CPU-only and Apple MPS. 9 groups across 4 accelerators, verdicts identical in all of them.

Browsers. The shipped picker module was executed inside Chromium, Firefox and WebKit over all 320 reachable states: 320/320 in each, no page errors. WebKit is Safari's engine and Edge is Chromium, so those two are engine-level rather than product-level coverage; I am not claiming Safari.app or Edge.exe were run. For what it is worth the compile target is not close to being a problem either: Vite 8's baseline-widely-available resolves to chrome111, edge111, firefox114, safari16.4, and the new code uses only Array.includes, Array.find, arrow functions and a type-only readonly.

Results

Check Result
pytest unsloth_cli/tests/test_start.py 567 passed, 3 skipped (was 71 failed)
Frontend npm test 6113 passed, 0 failed
npm run typecheck clean
ruff check unsloth_cli/ clean
eslint on touched files no new findings vs main
Simulation matrix, 3 revisions no unexpected changes
Browser engines chromium, firefox, webkit all 320/320

One thing I deliberately left alone: manually clicking Claude Code or Codex on a safetensors model still produces a command the CLI refuses. That was equally true for Codex before this PR, so it is not a regression this introduces, and fixing it properly wants a visible warning in the panel with a new i18n key across every locale. Worth a follow-up rather than widening this PR.

The 41 failures in test_inference_chat.py and test_studio_*_flag.py on this machine are identical on origin/main and unrelated to this change.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 1, 2026
Opening comment-reduction pass over the added lines only: 144 comment lines down
to 40, 72 percent, with every load-bearing fact kept. Deleted the ones that
restate the code or the test name; collapsed the multi-line rationales to one
line plus the citation that made them worth writing.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: e08fd7809f

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

Two holes in the picker, both from reading an uninitialised store as a fact.

activeGgufVariant, activeNativePathToken and ggufContextLength all start null,
so before /api/inference/status lands they are indistinguishable from a real
non-GGUF model. In a browser, where agent detection never runs and
detectedAgents stays empty for good, the first paint moved claude to opencode
and the second could not move back: pickCompatibleAgent([], "opencode", true)
correctly reports nothing to change. A GGUF session was therefore shown
"unsloth start opencode" permanently. The same window let the restored-
preference effect clear a saved claude or codex pick outright. isGguf is now
boolean or null, keyed on params.checkpoint (the signal useExampleModelName
already trusts), and both effects sit out the unresolved state. The helpers
still take a plain boolean, so dropping either guard fails typecheck.

A hand-made pick was also preserved for the whole session, which meant clicking
claude under a GGUF model and then loading a safetensors one kept offering a
command the CLI rejects. The session flag is replaced by the GGUF-ness the
click was made under, so a manual pick survives exactly until the model changes
beneath it, then gets revalidated like any other.
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 1, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 646893b82b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

The panel names the model from the /v1/models catalog, not from
params.checkpoint: useExampleModelName skips a checkpoint that is external or
path-shaped and falls back to the resident catalog entry. While an external
selection is active, use-chat-model-runtime deliberately stops applying local
inference status (isExternalSelectionActive), so activeGgufVariant and friends
freeze at whatever the last local model was. The catalog keeps polling, so if
the resident model is replaced during that session the two drift apart with no
path back to agreement, and the panel would keep offering claude or codex for a
model that is no longer a GGUF, or discard a valid preference on the inverse
transition.

isGguf is now null for an external checkpoint as well as an unset one, using
the same isExternalModelId predicate use-chat-model-runtime uses, so the two
cannot disagree about what counts as external. Both effects already sit out
null, so an unknown verdict re-steers nothing and clears nothing.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026

@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: 869af7d885

ℹ️ 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 668 to +670
if (!agentPickedByUserRef.current) return;
if (isGguf === null) return;
if (clickedUnderGgufRef.current === isGguf) return;

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 Reject incompatible manual agent selections

When the active model is safetensors or MLX, clicking the Claude or Codex chip sets clickedUnderGgufRef.current to false, so this equality guard immediately preserves the incompatible selection; the auto-pick effect also exits because the choice is marked manual. The panel then exposes an unsloth start claude/codex command that the newly added CLI gate rejects. Fresh evidence beyond the earlier model-change report is that the guard also fires when the user directly makes an incompatible selection without changing models; disable incompatible chips or validate the selected agent before preserving it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not taking this one. Two things are being conflated: an incompatible selection that arrives by itself, and one the app inflicts on the user.

The equality guard exists so a pick made by hand survives until the model's GGUF-ness changes under it. A direct click on Claude with a safetensors model loaded is the first case, and preserving it is the intended behaviour, not a bypass: it is exactly what the panel did before this PR, so it is not a regression this PR introduces.

Both suggested remedies are worse than that. Disabling the chip leaves a dead control with no explanation of why, on a panel whose whole job is to show the command. Silently overriding an explicit click means the user presses Claude and the UI hands back something else, which is the one interaction people reliably read as a bug. Meanwhile the command the user copies is not a trap: unsloth start claude refuses up front with a message naming the model and pointing at the -GGUF sibling, which is the gate this PR adds.

The right fix is a visible warning next to the command, and that needs a new i18n key across every locale, so it is a scoped follow-up rather than something to bolt onto this PR.

The GGUF fields this panel read are populated by useChatModelRuntime, which
only chat-page and hub-page mount, and local checkpoints are deliberately not
persisted. Settings opens from any route, including a button on the API Monitor
page that opens this exact panel, so off those two pages every field stayed
empty, compatibility stayed unknown, and both effects bailed out: the panel kept
offering the Claude command for a safetensors model.

Ask /api/inference/status as well, polled on the catalog's cadence, and read
is_gguf the way the CLI gate does: absent means the server did not report it,
never "not GGUF". The store still wins when it has an answer, since it updates
on the same paint as a model switch.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
scripts/run_ruff_format.py wants this one on a single line. It is the only file
this PR changes that the hook still adjusts.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

The status poll and useExampleModelName's catalog poll run on separate timers, so
a swap made from the CLI, another tab, or an auto-switching API request reaches
one of them before the other. The verdict was keyed only on the chat store, which
does not move for a swap made elsewhere, so for up to a poll the panel could pair
a newly named safetensors model with the previous GGUF verdict and go on offering
a Claude command the CLI refuses.

Carry the resident identifier with the verdict and use it only while it still
names the model the snippets name. Nothing named on either side is not a
contradiction, and the ":quant" suffix useExampleModelName pins is not part of
the identity. sameBaseModelId moves to agent-command.ts so both the existing
caller and this rule share one definition and can be tested.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
…ot guess when they disagree

Two follow-on defects in the identity check added in the previous commit.

/api/inference/status reports backend.active_model_name raw, while /v1/models
passes the same value through public_model_id, so a locally loaded path arrives
as "/models/foo" on one side and "foo" on the other and never matched. For a
path-loaded model that discarded the server verdict permanently, which on routes
that never mount the chat runtime left the gate dead again. The status side is
now collapsed with publicModelId, the frontend port of that same backend rule.

When the two polls do name different models, falling back to the chat store was
wrong: a swap made from the CLI or another tab is exactly what the store does not
see, so its verdict is about the model that left. That case is unknown now, and
unknown gates nothing.

Both readings live in one function, compatibilityFromSources, so the rule is in
one place and under test rather than spread across four derived booleans.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: ee47b763b4

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

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
Successive rounds left three explanations stacked above single statements. Same
intent, 46 fewer lines. Comments only: comment_tools.py check reports code
unchanged on all four files.
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
main gained isServedByLlamaCpp, which answers the question this branch derived
inline and answers it better: loadedIsGguf is the backend's own verdict, and a
context length is explicitly not evidence, since MLX reports one too. The store
side now delegates to it and keeps only the tri-state around it, so an absent or
external checkpoint still reads as unknown rather than as a definite no.

The auto-pick effect main still carried is the one this branch replaces, so the
branch version stands.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@danielhanchen
danielhanchen merged commit c59cd2d into unslothai:main Sep 1, 2026
48 of 50 checks passed

@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: aa585ca244

ℹ️ 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 +685 to +686
const isGguf: boolean | null = compatibilityFromSources(
storeIsGguf,

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 Match the store verdict to the catalog model

In the Tauri panel, when a local selection changes from a non-GGUF model to a GGUF model, the store updates immediately while useExampleModelName can still name the previous resident model until its catalog request finishes. The stale status answer is correctly discarded by storeModelKey, but passing storeIsGguf here without checking activeCheckpoint against model makes isGguf true for the old non-GGUF model; with Claude detected, the auto-pick effect then briefly exposes a Claude command that the CLI rejects. Apply the same model-identity check to the store verdict or keep compatibility unknown until the catalog catches up.

Useful? React with 👍 / 👎.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 7, 2026
…othai#16952)

The note at the bottom of Settings > Agents said only Codex needs a GGUF
model served by llama-server, and that other agents can also use
transformer-backed models. `unsloth start claude` has refused non-GGUF
local models since unslothai#10089, so anyone who followed the note with the
Claude agent and a transformer model got a "needs a GGUF model served by
llama-server" error when running the command.

The note now names both agents that need a GGUF model. The same sentence
is updated in every translated locale, since they all carried the old
wording. The command line and its checks are unchanged.


### Before / after

Settings > Agents with the default coding agent selected, merge base
`1a4e758e9` (left) vs this PR `90ec1a76b` (right). The note under the
subagent section now names both agents that need a GGUF model.

![Settings Agents tab note before and
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/16952/pr16952_before_after-319ab53417d9.png)
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