diff --git a/litellm/proxy/_lazy_openapi_snapshot.json b/litellm/proxy/_lazy_openapi_snapshot.json index 63d4d769edc..f1b05ac31f7 100644 --- a/litellm/proxy/_lazy_openapi_snapshot.json +++ b/litellm/proxy/_lazy_openapi_snapshot.json @@ -22712,6 +22712,9 @@ "1536x1024" ], "type": "string" + }, + { + "type": "null" } ], "title": "Size" diff --git a/litellm/proxy/image_endpoints/endpoints.py b/litellm/proxy/image_endpoints/endpoints.py index 9b8b98647e7..7e35315f8a3 100644 --- a/litellm/proxy/image_endpoints/endpoints.py +++ b/litellm/proxy/image_endpoints/endpoints.py @@ -53,7 +53,7 @@ IMAGE_VARIATION_OPTIONAL_FIELD_DEFAULTS: Final = MappingProxyType({"image": None # ImageVariationRequestParams carries FileTypes (typing.IO[bytes]) which # pydantic cannot turn into a JSON schema, so the documented JSON body # schema is spelled out for the shape the multipart form accepts. -_IMAGE_VARIATION_REQUEST_BODY: Final[dict[str, object]] = { +_IMAGE_VARIATION_REQUEST_BODY: Final[dict[str, object]] = { # mutable-ok: OpenAPI JSON fixture, never mutated "required": True, "content": { "application/json": { @@ -71,7 +71,9 @@ _IMAGE_VARIATION_REQUEST_BODY: Final[dict[str, object]] = { } }, } -_IMAGE_VARIATION_OPENAPI_EXTRA: Final[dict[str, object]] = {"requestBody": _IMAGE_VARIATION_REQUEST_BODY} +_IMAGE_VARIATION_OPENAPI_EXTRA: Final[dict[str, object]] = { # mutable-ok: handed to FastAPI which copies openapi_extra + "requestBody": _IMAGE_VARIATION_REQUEST_BODY +} IMAGE_ARRAY_FIELD: Final = "image[]" MASK_ARRAY_FIELD: Final = "mask[]" diff --git a/litellm/types/images/main.py b/litellm/types/images/main.py index c9ca499824e..94623d80a19 100644 --- a/litellm/types/images/main.py +++ b/litellm/types/images/main.py @@ -42,5 +42,5 @@ class ImageVariationRequestParams(ImageEditOptionalRequestParams, total=False): Params here: https://platform.openai.com/docs/api-reference/images/createVariation """ - image: FileTypes - model: str | None + image: FileTypes # writable-ok: request params mirror ImageEditRequestParams' mutable wire format + model: str | None # writable-ok: request params mirror ImageEditRequestParams' mutable wire format