-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Description:
When trying to use the /v1/images/edits endpoint with the mask parameter for Azure’s gpt-image-1 model, LiteLLM throws an AzureException APIError complaining about an unexpected _io.BytesIO type.
Error:
litellm.APIError: AzureException APIError - Invalid type for value. Expected primitive type, got <class '_io.BytesIO'>: <_io.BytesIO object at 0x7f953ddc1760>
Payload :
curl -X POST "http://localhost:4000/v1/images/edits"
-H "Authorization: Bearer your-api-key"
-F "model=gpt-image-1"
-F "image=@original_image.png"
-F "mask=@mask_image.png"
-F "prompt=Add a beautiful sunset in the background"
-F "n=1"
-F "size=1024x1024"
-F "response_format=url"
Relevant log output
Error:
litellm.APIError: AzureException APIError - Invalid type for value. Expected primitive type, got <class '_io.BytesIO'>: <_io.BytesIO object at 0x7f953ddc1760
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.74.0-stable
Twitter / LinkedIn details
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working