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 <themavik@users.noreply.github.com>
This commit is contained in:
Mavik
2026-03-20 12:14:47 +05:30
committed by GitHub
co-authored by themavik
parent 784f9431ad
commit be2c679f2d
+9 -5
View File
@@ -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: