Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: pin the /status chat template echo behaviour (#8080)

Michael Hanc652e7622431
diff --git a/studio/backend/tests/test_inference_status_loaded_gguf.py b/studio/backend/tests/test_inference_status_loaded_gguf.py
index 8ddd5f3492b..e17a6058fbe 100644
--- a/studio/backend/tests/test_inference_status_loaded_gguf.py
+++ b/studio/backend/tests/test_inference_status_loaded_gguf.py
@@ -116,3 +116,25 @@ def test_a_local_path_load_without_a_lease_is_still_local(status_route):
status = status_route(_StatusBackend(local, native_grant_backed = False))
assert status.is_gguf is True
assert status.is_local_model is True
+
+
+def test_the_users_chat_template_override_wins_over_the_runtime_projection(status_route):
+ # The field is on the shared runtime fields, so the projection carries it too.
+ # It must be overridden, not passed alongside, or the call is a TypeError.
+ backend = _StatusBackend("org/A-GGUF")
+ backend.chat_template_override = "user-template"
+ status = status_route(backend)
+ assert status.chat_template_override == "user-template"
+
+
+def test_an_auto_applied_chat_template_is_not_reported_as_the_users(status_route, monkeypatch):
+ # A bundled family template is not a user override; re-sending it would pin
+ # it onto the next, unrelated model.
+ monkeypatch.setattr(
+ inference_route,
+ "resolve_effective_chat_template_override",
+ lambda **k: "bundled-template",
+ )
+ backend = _StatusBackend("org/A-GGUF")
+ backend.chat_template_override = "bundled-template"
+ assert status_route(backend).chat_template_override is None