From be2c679f2dfd7c112c5879bccf51ddf45d75bfea Mon Sep 17 00:00:00 2001 From: Mavik <179817126+themavik@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:44:47 -0400 Subject: [PATCH] fix: resolve recursion in OVHCloud get_supported_openai_params (#24118) * fix: resolve recursion in OVHCloud get_supported_openai_params (#24111) Root cause: OVHCloudChatConfig.get_supported_openai_params() called get_model_info() which called back into get_supported_openai_params(), causing infinite recursion and falling back to no tools support. Made-with: Cursor * fix: use .get() for TypedDict + don't hardcode function_calling support Made-with: Cursor --------- Co-authored-by: themavik --- litellm/llms/ovhcloud/chat/transformation.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/litellm/llms/ovhcloud/chat/transformation.py b/litellm/llms/ovhcloud/chat/transformation.py index e2a9fea789..84090fafd3 100644 --- a/litellm/llms/ovhcloud/chat/transformation.py +++ b/litellm/llms/ovhcloud/chat/transformation.py @@ -7,7 +7,7 @@ More information on our website: https://endpoints.ai.cloud.ovh.net from typing import Optional, Union, List import httpx -from litellm.utils import ModelResponseStream, get_model_info +from litellm.utils import ModelResponseStream, _get_model_info_helper from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig from litellm._logging import verbose_logger from litellm.llms.ovhcloud.utils import OVHCloudException @@ -28,13 +28,17 @@ class OVHCloudChatConfig(OpenAIGPTConfig): """ supports_function_calling: Optional[bool] = None try: - model_info = get_model_info(model, custom_llm_provider="ovhcloud") - supports_function_calling = model_info.get( - "supports_function_calling", False + model_info = _get_model_info_helper( + model, custom_llm_provider="ovhcloud" ) + supports_function_calling = model_info.get( + "supports_function_calling", None + ) + if supports_function_calling is None: + supports_function_calling = False except Exception as e: verbose_logger.debug(f"Error getting supported OpenAI params: {e}") - pass + supports_function_calling = False optional_params = super().get_supported_openai_params(model) if supports_function_calling is not True: