Skip to content

Studio: keep Max Tool Calls Per Message set to Off after a reload - #11234

Merged
Lyxot merged 4 commits into
unslothai:mainfrom
NilayYadav:max-tool-calls-off-persist
Sep 18, 2026
Merged

Lyxot merged 4 commits into
unslothai:mainfrom
NilayYadav:max-tool-calls-off-persist

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

Setting Max Tool Calls Per Message to Off worked until the page was reloaded. Then it went back to the old number and tools ran again, with no error. The slider allowed 0 but the code that saves settings only accepted 1 or more.

Saving and loading now accept 0, in the browser and on the server. Tool call timeout still starts at 1.

Tested in Studio by setting the slider to Off and reloading. Before, it came back as 25. After, it stays Off.

@Lyxot Lyxot self-assigned this Sep 18, 2026
@Lyxot

Lyxot commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Pushed a small follow-up (c89b695), no behavior change to the fix:

  • _not_a_boolean: shortened the comment. It said the run route rejects booleans for both fields, which isn't true for max_tool_calls_per_message (the run request accepts false as 0). Dropped ValidationInfo; the 400 already names the field in loc.
  • Backend tests: replaced the TestClient harness with rows in the existing test_out_of_contract_values_are_rejected table (False, True, -1, toolCallTimeout: 0) plus a model_validate round-trip for 0, matching the rest of the file.

@Lyxot

Lyxot commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Codex review on a staging copy at c89b695 (same head as this PR): no major issues. Lyxot#55 (comment)

@Lyxot Lyxot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Off (0) now survives save and reload on both the frontend sanitizers and the settings payload; toolCallTimeout keeps its floor of 1 and booleans are still rejected. CI green.

@Lyxot
Lyxot merged commit b8f7752 into unslothai:main Sep 18, 2026
53 checks passed
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…slothai#11234)

* Studio: keep Max Tool Calls Per Message = Off across a reload

* Studio: reject a boolean for maxToolCallsPerMessage

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test(studio): cover max tool calls Off in the settings payload table

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Lyxot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants