unsloth/studio
Daniel Han 615b860803 Studio: tighten Llama-3.2 bare-JSON guard for PR #5811
A fuzz pass turned up that ``_parse_llama3_bare_json`` accepted
``parameters`` as a string, contradicting the docstring's
"parameters or arguments is a dict" guard. Prose like
``{"name":"foo","parameters":"a sentence"}`` would wrongly fire
the parser, which the agentic loop would then heal into a real
``foo(query="a sentence")`` call.

Tightened guard:

  - ``parameters`` must be a dict (Llama-3 spec).
  - ``arguments`` may be a dict, or a JSON-encoded string that
    decodes to a dict (OpenAI shape, e.g.
    ``"arguments":"{\"q\":\"x\"}"``). Plain non-JSON strings,
    JSON-strings of lists / scalars / null no longer pass.

Added 4 regression tests under TestParserMultiFormat:

  - test_llama3_2_bare_json_string_parameters_does_not_fire
  - test_llama3_2_bare_json_string_arguments_not_json_does_not_fire
  - test_llama3_2_bare_json_string_arguments_json_dict_fires
  - test_llama3_2_bare_json_string_arguments_json_non_dict_does_not_fire

Existing tests stay green (104 -> 108 passing) and a 50-case
cross-version fuzz suite passes on Python 3.10 / 3.11 / 3.12 / 3.13.
2026-05-27 14:28:08 +00:00
..
backend Studio: tighten Llama-3.2 bare-JSON guard for PR #5811 2026-05-27 14:28:08 +00:00
frontend Studio: add Gemini provider with web_search, code_execution, prompt caching, and Nano Banana image generation (#5720) 2026-05-27 06:01:24 -07:00
src-tauri Fix Windows workflow issues(#5694) 2026-05-22 05:32:30 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py Harden Linux llama.cpp prebuilt reuse (#5796) 2026-05-27 05:01:04 -07:00
install_python_stack.py Studio: unblock install on Linux ARM64 + Windows ARM64 + Intel Mac (#5790) 2026-05-27 04:53:38 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 studio: regenerate desktop launcher on unsloth studio update (macOS + Linux + Windows) (#5577) 2026-05-19 05:49:10 -07:00
setup.sh Studio: unblock install on Linux ARM64 + Windows ARM64 + Intel Mac (#5790) 2026-05-27 04:53:38 -07:00
Unsloth_Studio_Colab.ipynb studio: add --local to setup.sh + overlay unsloth-zoo from git main (#5252) 2026-05-02 08:51:56 +04:00