mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +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
|
@ -420,3 +420,21 @@ def test_dynamic_drop_additional_params_e2e():
|
|||
print(mock_response.call_args.kwargs["data"])
|
||||
assert "response_format" not in mock_response.call_args.kwargs["data"]
|
||||
assert "additional_drop_params" not in mock_response.call_args.kwargs["data"]
|
||||
|
||||
|
||||
def test_get_optional_params_image_gen():
|
||||
response = litellm.utils.get_optional_params_image_gen(
|
||||
aws_region_name="us-east-1", custom_llm_provider="openai"
|
||||
)
|
||||
|
||||
print(response)
|
||||
|
||||
assert "aws_region_name" not in response
|
||||
|
||||
response = litellm.utils.get_optional_params_image_gen(
|
||||
aws_region_name="us-east-1", custom_llm_provider="bedrock"
|
||||
)
|
||||
|
||||
print(response)
|
||||
|
||||
assert "aws_region_name" in response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue