fix(azure_ai): narrow MAI edit size param type for mypy

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Sameer Kankute 2026-06-08 11:59:46 +05:30
parent c1316a4d82
commit 7c8ed6d100
No known key found for this signature in database

View file

@ -1,4 +1,4 @@
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, cast
import httpx
from httpx._types import RequestFiles
@ -43,8 +43,9 @@ class AzureFoundryMAIImageEditConfig(OpenAIImageEditConfig):
if key in supported_params:
if key == "size" and value:
self._validate_size_param(value)
optional_params[key] = value
size_param = cast(str, value)
self._validate_size_param(size_param)
optional_params[key] = size_param
else:
optional_params[key] = value
elif not drop_params: