Commit c6b93352

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2025-07-21 20:27:19
fix(parsing): ignore empty metadata
1 parent fa466c0
Changed files (1)
src
openai
src/openai/_models.py
@@ -464,7 +464,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]
         type_ = type_.__value__  # type: ignore[unreachable]
 
     # unwrap `Annotated[T, ...]` -> `T`
-    if metadata is not None:
+    if metadata is not None and len(metadata) > 0:
         meta: tuple[Any, ...] = tuple(metadata)
     elif is_annotated_type(type_):
         meta = get_args(type_)[1:]