mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix(bfl): check HTTP status when downloading image from URL
Add raise_for_status() to avoid sending error page content as image data to BFL API.
This commit is contained in:
parent
fac6c068a0
commit
d693007726
1 changed files with 1 additions and 0 deletions
|
|
@ -200,6 +200,7 @@ class BlackForestLabsImageEditConfig(BaseImageEditConfig):
|
|||
if image.startswith(("http://", "https://")):
|
||||
# Download image from URL
|
||||
response = httpx.get(image, timeout=60.0)
|
||||
response.raise_for_status()
|
||||
return response.content
|
||||
else:
|
||||
# Assume it's a file path
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue