From 213be4125d434e5691d2a33b87918b9bf8432916 Mon Sep 17 00:00:00 2001 From: TAYLOR EVANS Date: Thu, 9 Apr 2026 05:15:02 -0700 Subject: [PATCH] Update litellm/__init__.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/__init__.py b/litellm/__init__.py index 350e3f0186a..c3cf0b1d024 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -213,8 +213,9 @@ token: Optional[ ] = None # Not used anymore, will be removed in next MAJOR release - https://github.com/BerriAI/litellm/discussions/648 telemetry = True max_tokens: int = DEFAULT_MAX_TOKENS # OpenAI Defaults -max_mcp_auto_execution_rounds: int = int( - os.getenv("LITELLM_MAX_MCP_AUTO_EXECUTION_ROUNDS", 6) +_raw_max_rounds = os.getenv("LITELLM_MAX_MCP_AUTO_EXECUTION_ROUNDS") +max_mcp_auto_execution_rounds: int = ( + int(_raw_max_rounds) if _raw_max_rounds is not None and _raw_max_rounds.isdigit() else 6 ) drop_params = bool(os.getenv("LITELLM_DROP_PARAMS", False)) modify_params = bool(os.getenv("LITELLM_MODIFY_PARAMS", False))