From 1fe2e92d3272bcf1c7d21f401efd8b8a32bbd475 Mon Sep 17 00:00:00 2001 From: Chesars Date: Tue, 3 Mar 2026 14:34:32 -0300 Subject: [PATCH] fix(main): forward enable_json_schema_validation to acompletion_with_mcp The parameter was declared in completion() signature but not passed to acompletion_with_mcp, causing per-request JSON schema validation to silently fall back to the global default when MCP tools are present. --- litellm/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/main.py b/litellm/main.py index 362e5b8b263..75353c1b070 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -1170,6 +1170,7 @@ def completion( # type: ignore # noqa: PLR0915 thinking=thinking, web_search_options=web_search_options, shared_session=shared_session, + enable_json_schema_validation=enable_json_schema_validation, **kwargs, ) api_base = kwargs.get("api_base", None)