BerriAI / litellm

Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropic, Sagemaker, HuggingFace, Replicate, Groq]
https://docs.litellm.ai/docs/
Other
13.83k stars 1.63k forks source link

[Bug]: ignore `aws_region_name` parameter for openai image generation calls #5009

Closed dleen closed 3 months ago

dleen commented 3 months ago

What happened?

When using bedrock models with image generation the aws_region_name parameter (same as chat completion) is not recognized:

Relevant log output

22:45:42 - LiteLLM:DEBUG: litellm_logging.py:205 - self.optional_params: {'aws_region_name': 'us-east-1'}
2024-08-01 22:45:42,561 DEBUG    LiteLLM.litellm_logging 205 self.optional_params: {'aws_region_name': 'us-east-1'}
22:45:42 - LiteLLM:DEBUG: utils.py:237 - RAW RESPONSE:
AsyncImages.generate() got an unexpected keyword argument 'aws_region_name'

Twitter / LinkedIn details

No response

krrishdholakia commented 3 months ago

AsyncImages.generate() got an unexpected keyword argument 'aws_region_name'

this looks like it's going to the wrong route. how're you calling litellm? @dleen

dleen commented 3 months ago

Calling via:

litellm.aimage_generation(model="dall-e-3", prompt="image of an image", aws_region_name="us-east-1")
dleen commented 3 months ago

For acompletion it is able to ignore the aws_region_name parameter successfully