mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
chore: restore gate annotations lost in rebase and align the spliced ImageResponse schema with the CI regeneration
The rebase onto ff2718b dropped the ANN201/BLE001 suppressions from the
variation handler (both back with their reasons), and the hand-spliced
ImageResponse fragment still carried the wider quality enum and the free-
form size branch that the Linux regeneration does not produce - both now
match the exact hunks the check prints.
This commit is contained in:
parent
48ba5d06a5
commit
8b09d8dfd6
2 changed files with 3 additions and 11 deletions
|
|
@ -22693,9 +22693,7 @@
|
|||
"enum": [
|
||||
"low",
|
||||
"medium",
|
||||
"high",
|
||||
"xhigh",
|
||||
"max"
|
||||
"high"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -22707,9 +22705,6 @@
|
|||
},
|
||||
"size": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"1024x1024",
|
||||
|
|
@ -22717,9 +22712,6 @@
|
|||
"1536x1024"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Size"
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ async def image_edit_api(
|
|||
openapi_extra=dict[str, object](_IMAGE_VARIATION_OPENAPI_EXTRA),
|
||||
response_class=ORJSONResponse,
|
||||
) # azure compatible endpoint
|
||||
async def image_variation_api(
|
||||
async def image_variation_api( # noqa: ANN201 # response type mirrors image_edit_api (provider-dependent)
|
||||
request: Request,
|
||||
fastapi_response: Response,
|
||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), # noqa: B008 # FastAPI dependency injection
|
||||
|
|
@ -474,7 +474,7 @@ async def image_variation_api(
|
|||
user_api_base=user_api_base,
|
||||
version=version,
|
||||
)
|
||||
except Exception as e:
|
||||
except Exception as e: # noqa: BLE001 # provider-agnostic error surfacing mirrors image_edit_api
|
||||
raise await processor.handle_llm_api_exception(
|
||||
e=e,
|
||||
user_api_key_dict=user_api_key_dict,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue