From 9e47d34bf87e972bc3bc59b2fdaa65a6e9ec373b Mon Sep 17 00:00:00 2001 From: factnn <166481866+factnn@users.noreply.github.com> Date: Tue, 30 Jun 2026 00:51:44 +0800 Subject: [PATCH] fix: add base_model param to _supports_factory signature --- litellm/utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 37559a505ab..ac1ba2db49c 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2329,13 +2329,21 @@ def _supports_provider_info_factory( return None -def _supports_factory(model: str, custom_llm_provider: Optional[str], key: str) -> bool: +def _supports_factory( + model: str, + custom_llm_provider: Optional[str], + key: str, + base_model: Optional[str] = None, +) -> bool: """ Check if the given model supports function calling and return a boolean value. Parameters: model (str): The model name to be checked. custom_llm_provider (Optional[str]): The provider to be checked. + base_model (Optional[str]): If set, used as a fallback when the model + string itself is not found in the registry (e.g. custom Azure + deployment names). Returns: bool: True if the model supports function calling, False otherwise.