forked from phoenix/litellm-mirror
fix(utils.py): fix openrouter tool calling params
This commit is contained in:
parent
5e521bd36e
commit
4c95782f74
1 changed files with 7 additions and 1 deletions
|
@ -2406,7 +2406,9 @@ def get_optional_params(
|
||||||
elif k == "hf_model_name" and custom_llm_provider != "sagemaker":
|
elif k == "hf_model_name" and custom_llm_provider != "sagemaker":
|
||||||
continue
|
continue
|
||||||
elif (
|
elif (
|
||||||
k.startswith("vertex_") and custom_llm_provider != "vertex_ai" and custom_llm_provider != "vertex_ai_beta"
|
k.startswith("vertex_")
|
||||||
|
and custom_llm_provider != "vertex_ai"
|
||||||
|
and custom_llm_provider != "vertex_ai_beta"
|
||||||
): # allow dynamically setting vertex ai init logic
|
): # allow dynamically setting vertex ai init logic
|
||||||
continue
|
continue
|
||||||
passed_params[k] = v
|
passed_params[k] = v
|
||||||
|
@ -3871,6 +3873,10 @@ def get_supported_openai_params(
|
||||||
"top_p",
|
"top_p",
|
||||||
"stop",
|
"stop",
|
||||||
"seed",
|
"seed",
|
||||||
|
"tools",
|
||||||
|
"tool_choice",
|
||||||
|
"functions",
|
||||||
|
"function_call",
|
||||||
]
|
]
|
||||||
elif custom_llm_provider == "huggingface":
|
elif custom_llm_provider == "huggingface":
|
||||||
return litellm.HuggingfaceConfig().get_supported_openai_params()
|
return litellm.HuggingfaceConfig().get_supported_openai_params()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue