Repository navigation
unsloth start/run: tool-call flags, positional model, and grouped help - #7328
Conversation
Expose the existing tool-call controls as first-class CLI flags on both unsloth run and unsloth start, add positional model detection with a GGUF quant default, and group --help into rich panels. Flags (unsloth run): --enable-tool-call-healing/--disable-tool-call-healing (default on), --enable-tool-call-nudging/--disable-tool-call-nudging (default on). Resolved before any re-exec and written to the existing env controls (UNSLOTH_DISABLE_TOOL_CALL_HEALING, UNSLOTH_TOOL_CALL_NUDGE) so the in-venv server reads them at import; an omitted flag respects a value the parent already set. Flags (unsloth start): --enable-tools/--disable-tools (default off, passthrough), plus the same healing/nudging flags (default on). start conveys them to the auto-started run via the child env and the tools flag, so it stays correct even if run re-execs into an older Studio venv. Positional model: a leading org/name(:variant) token routes to --model when --model is absent, without stealing an option value or an agent passthrough arg. A bare GGUF repo with no variant defaults to UD-Q4_K_XL for the unsloth namespace and Q4_K_M elsewhere, applied only on the fresh auto-serve path so attaching to a loaded model never reloads. Help is grouped into rich panels (Model / Server / Session for start; Model / Server and network / Tool calls / Advanced for run) so --help reads cleanly. Adds unit coverage for the helpers, the start command-and-env forwarding, the positional/quant defaulting, and the run env resolution.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33e91ca482
ℹ️ 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".
…not stolen Route a bare org/name positional to --model only when it resolves as a hub id (via the existing _is_hub_model_id, which rejects local paths and existing dirs), so an OpenCode project dir like owner/repo is left for the agent. Apply the same guard to the auto-serve GGUF quant default so a local -GGUF path is not forced to a quant it may not contain.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9469d01ad
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…t inherited tool-call env - Require typer>=0.12.0. The rich_help_panel options added here crash at import on typer<0.6, and the dependency was previously unbounded. - Stop forcing a default GGUF quant for a bare org/name-GGUF on auto-serve. The server's own quant preference already picks UD-Q4_K_XL for Unsloth uploads and Q4_K_M otherwise, and falls back when that exact quant is missing, so forcing a fixed variant broke external repos that only publish Q5_K_M/Q8_0. - Make the healing/nudging start flags tri-state so an omitted flag keeps an operator's inherited UNSLOTH_DISABLE_TOOL_CALL_HEALING / UNSLOTH_TOOL_CALL_NUDGE instead of overwriting it with the start defaults.
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b606015aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Exposes the existing tool-call controls as first-class CLI flags on both
unsloth runandunsloth start, adds positional model detection with a GGUF quant default, and groups--helpinto panels so it is readable.Tool-call flags
unsloth rungains:--enable-tool-call-healing/--disable-tool-call-healing(default on): promote text-form tool calls (small GGUFs often emit<tool_call>...) back into structured calls on the client-tool passthrough. Disable is an absolute server kill-switch.--enable-tool-call-nudging/--disable-tool-call-nudging(default on): on the non-streaming client-tool passthrough, retry once with a short nudge when a tool signal cannot be healed. No effect on streaming requests or the server-side agentic loop.unsloth startgains:--enable-tools/--disable-tools(default off, so the agent's own tools are relayed unchanged).These map to the controls that already existed (
UNSLOTH_DISABLE_TOOL_CALL_HEALING,UNSLOTH_TOOL_CALL_NUDGE, andset_tool_policy); no new competing env vars are introduced.runresolves them before any re-exec and writes the env so the in-venv server reads them at import; an omitted flag respects a value the parent already set.startconveys its choice to the auto-startedrunvia the child env plus the tools flag, which stays correct even ifrunre-execs into an older Studio venv. The flags apply only whenstartauto-starts the server; a pre-existing server is reused unchanged (same as--model).Positional model + quant default
unsloth start claude unsloth/gemma-4-E2B-it-GGUF:UD-Q4_K_XLnow works without--model: a leadingorg/name(:variant)token routes to--model. Only the first token is considered and only when--modelis absent, so an option value like--profile owner/repoand ordinary agent passthrough args (e.g.--continue) are never stolen; paths, flags and Windows drives are ignored.A bare GGUF repo with no variant defaults its quant:
UD-Q4_K_XLfor theunslothnamespace,Q4_K_Melsewhere. This is applied only on the fresh auto-serve path, so attaching to an already-loaded model never triggers a reload.Help formatting
--helpfor both commands is grouped into rich panels (Model / Server / Agent session forstart; Model / Server and network / Tool calls / Advanced forrun) instead of one long unaligned list.Testing
python -m pytest unsloth_cli/tests/test_start.py unsloth_cli/tests/test_studio_run_parallel_flag.py unsloth_cli/tests/test_studio_run_short_alias_clashes.py-> 413 passed. New cases cover the positional/quant helpers, the_start_studio_servercommand-and-env forwarding, the auto-serve quant default, and therunenv resolution (default, explicit disable, and respecting an inherited value).