mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): parse out aws specific params from openai call
Fixes https://github.com/BerriAI/litellm/issues/5009
This commit is contained in:
parent
5add6687cc
commit
ed8b20fa18
2 changed files with 30 additions and 0 deletions
|
@ -2391,6 +2391,18 @@ def get_optional_params_image_gen(
|
|||
additional_drop_params = passed_params.pop("additional_drop_params", None)
|
||||
special_params = passed_params.pop("kwargs")
|
||||
for k, v in special_params.items():
|
||||
if k.startswith("aws_") and (
|
||||
custom_llm_provider != "bedrock" and custom_llm_provider != "sagemaker"
|
||||
): # allow dynamically setting boto3 init logic
|
||||
continue
|
||||
elif k == "hf_model_name" and custom_llm_provider != "sagemaker":
|
||||
continue
|
||||
elif (
|
||||
k.startswith("vertex_")
|
||||
and custom_llm_provider != "vertex_ai"
|
||||
and custom_llm_provider != "vertex_ai_beta"
|
||||
): # allow dynamically setting vertex ai init logic
|
||||
continue
|
||||
passed_params[k] = v
|
||||
|
||||
default_params = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue