unsloth/studio/backend/routes
Daniel Han 4c06c1dcc7
Studio: enable audio input for Gemma 4 GGUFs; default chat model to Qwen3.5-4B-MTP (#6000)
* Studio: enable audio input for Gemma 4 GGUF models

Audio file upload was disabled for Gemma 4 vision+audio GGUFs (e.g.
gemma-4-12b-it-GGUF) even though their mmproj carries an audio encoder
(clip.has_audio_encoder, gemma4ua). Two causes:

- Audio-input detection only matched Gemma 3n's <audio_soft_token>;
  Gemma 4 uses <|audio|>, so audio_vlm was never detected.
- The GGUF load/status responses hardcoded has_audio_input=False, so the
  flag was dropped even when audio_vlm was detected (affected Gemma 3n
  GGUFs too).

Changes:
- Recognize <|audio|> alongside <audio_soft_token> in the llama-server
  token probe and the tokenizer-config pattern.
- Read clip.has_audio_encoder from the mmproj as an independent,
  model-agnostic signal (read_mmproj_audio_capability).
- Emit the computed has_audio_input on the GGUF load/status responses.
- Tests for the new pattern and the mmproj reader.

* Studio: default chat model and dataset helper to Qwen3.5-4B-MTP

Switch the auto-loaded chat default and the dataset-analysis helper GGUF
from gemma-4-E2B-it to unsloth/Qwen3.5-4B-MTP-GGUF (UD-Q4_K_XL).

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-04 00:56:53 -07:00
..
data_recipe Configurable upload Cap studio (for training) (#5808) 2026-06-02 08:52:19 -07:00
.gitkeep root studio folder 2026-02-02 09:13:49 +00:00
__init__.py Studio: add remote MCP server support (#5750) 2026-05-27 07:01:11 -07:00
auth.py fix(studio): don't double-quote the reset-password hint for spaced paths (#5975) 2026-06-03 06:10:23 -07:00
chat_history.py Studio: manage chat history with projects (#5725) 2026-06-01 22:09:16 +04:00
datasets.py Configurable upload Cap studio (for training) (#5808) 2026-06-02 08:52:19 -07:00
export.py studio: security and hardening pass (auth rate-limit, sandbox, path containment, schema validation, headers) (#5375) 2026-05-13 06:12:18 -07:00
inference.py Studio: enable audio input for Gemma 4 GGUFs; default chat model to Qwen3.5-4B-MTP (#6000) 2026-06-04 00:56:53 -07:00
mcp_servers.py Studio: clearer MCP server validation when stdio is disabled (#5928) 2026-06-01 08:19:20 -07:00
models.py Fix /recommended-folders 500 on unreadable model directories (Python 3.12+) (#5523) 2026-05-18 00:16:14 +04:00
providers.py 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
settings.py Configurable upload Cap studio (for training) (#5808) 2026-06-02 08:52:19 -07:00
training.py Studio: expose image size setting in training UI (#5743) 2026-05-27 05:01:24 -07:00
training_history.py Studio: Dark theme refactor, right sidebar redesign, and chat UI polish (#5150) 2026-05-07 14:33:31 +04:00