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.

Use the public fastmcp call_tool so the MCP guard test survives fastmcp 4 (#10110)

Daniel Han6a8b3874f677
diff --git a/studio/backend/tests/test_mcp_training_start_guard.py b/studio/backend/tests/test_mcp_training_start_guard.py
index ddff1406d4b..d18b4b90140 100644
--- a/studio/backend/tests/test_mcp_training_start_guard.py
+++ b/studio/backend/tests/test_mcp_training_start_guard.py
@@ -361,8 +361,10 @@ def test_the_mcp_tool_surfaces_the_409_as_a_tool_error_not_a_dict(monkeypatch):
from fastmcp.exceptions import ToolError
+ # call_tool, not the private _call_tool_mcp fastmcp 4 dropped: requirements
+ # floor it at 3.0.2 and never cap it, so a test may only use the public API.
with pytest.raises(ToolError) as tool_error:
- asyncio.run(server._call_tool_mcp("start_training", {"config": _config()}))
+ asyncio.run(server.call_tool("start_training", {"config": _config()}))
# mask_error_details defaults False, so the 409 detail survives to the client
# (as the text of an isError CallToolResult, not a JSON-RPC protocol error).