6161 "AdditionalToolsAgent" ,
6262 "ImageGenerationCall" ,
6363 "ImageGenerationCallAgent" ,
64+ "ImageGenerationCallError" ,
65+ "ImageGenerationCallErrorModerationDetails" ,
6466 "LocalShellCall" ,
6567 "LocalShellCallAction" ,
6668 "LocalShellCallAgent" ,
@@ -496,6 +498,35 @@ class ImageGenerationCallAgent(TypedDict, total=False):
496498 """The canonical name of the agent that produced this item."""
497499
498500
501+ class ImageGenerationCallErrorModerationDetails (TypedDict , total = False ):
502+ """Public details for a `moderation_blocked` error, when available."""
503+
504+ categories : Required [SequenceNotStr [str ]]
505+ """Public moderation categories. New category values may be added over time."""
506+
507+ moderation_stage : Required [Literal ["input" , "output" , "unknown" ]]
508+ """The stage where moderation blocked the image generation call."""
509+
510+
511+ class ImageGenerationCallError (TypedDict , total = False ):
512+ """Details of a moderation failure, when available."""
513+
514+ code : Required [Optional [str ]]
515+ """The error code."""
516+
517+ message : Required [str ]
518+ """A description of the error."""
519+
520+ param : Required [Optional [str ]]
521+ """The related request parameter."""
522+
523+ type : Required [str ]
524+ """The error type."""
525+
526+ moderation_details : ImageGenerationCallErrorModerationDetails
527+ """Public details for a `moderation_blocked` error, when available."""
528+
529+
499530class ImageGenerationCall (TypedDict , total = False ):
500531 """An image generation request made by the model."""
501532
@@ -520,6 +551,9 @@ class ImageGenerationCall(TypedDict, total=False):
520551 background : Optional [Literal ["transparent" , "opaque" , "auto" ]]
521552 """The background setting used for generation."""
522553
554+ error : ImageGenerationCallError
555+ """Details of a moderation failure, when available."""
556+
523557 output_format : Optional [Literal ["png" , "webp" , "jpeg" ]]
524558 """The output format used for generation."""
525559
0 commit comments