@@ -187,6 +187,49 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
187187 self .object : Literal ["assistant.deleted" ] = "assistant.deleted"
188188
189189
190+ class AgentErrorDetail (_Model ):
191+ """Describes the error information returned by the agents API.
192+
193+ :ivar message: Human-readable description of the error.
194+ :vartype message: str
195+ :ivar type: Error type identifier (e.g. ``invalid_request_error``).
196+ :vartype type: str
197+ :ivar param: Name of the parameter that caused the error, if applicable.
198+ :vartype param: str
199+ :ivar code: Machine-readable error code.
200+ :vartype code: str
201+ """
202+
203+ message : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
204+ """Human-readable description of the error."""
205+ type : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
206+ """Error type identifier (e.g. ``invalid_request_error``)."""
207+ param : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
208+ """Name of the parameter that caused the error, if applicable."""
209+ code : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
210+ """Machine-readable error code."""
211+
212+ @overload
213+ def __init__ (
214+ self ,
215+ * ,
216+ message : Optional [str ] = None ,
217+ type : Optional [str ] = None ,
218+ param : Optional [str ] = None ,
219+ code : Optional [str ] = None ,
220+ ) -> None : ...
221+
222+ @overload
223+ def __init__ (self , mapping : Mapping [str , Any ]) -> None :
224+ """
225+ :param mapping: raw JSON to initialize the model.
226+ :type mapping: Mapping[str, Any]
227+ """
228+
229+ def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
230+ super ().__init__ (* args , ** kwargs )
231+
232+
190233class AgentsNamedToolChoice (_Model ):
191234 """Specifies a tool the model should use. Use to force the model to call a specific tool.
192235
@@ -380,56 +423,17 @@ class AgentV1Error(_Model):
380423 """Error payload returned by the agents API.
381424
382425 :ivar error: Represents the error. Required.
383- :vartype error: ~azure.ai.agents.models.AgentV1ErrorError
426+ :vartype error: ~azure.ai.agents.models.AgentErrorDetail
384427 """
385428
386- error : "_models.AgentV1ErrorError " = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
429+ error : "_models.AgentErrorDetail " = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
387430 """Represents the error. Required."""
388431
389432 @overload
390433 def __init__ (
391434 self ,
392435 * ,
393- error : "_models.AgentV1ErrorError" ,
394- ) -> None : ...
395-
396- @overload
397- def __init__ (self , mapping : Mapping [str , Any ]) -> None :
398- """
399- :param mapping: raw JSON to initialize the model.
400- :type mapping: Mapping[str, Any]
401- """
402-
403- def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
404- super ().__init__ (* args , ** kwargs )
405-
406-
407- class AgentV1ErrorError (_Model ):
408- """AgentV1ErrorError.
409-
410- :ivar message:
411- :vartype message: str
412- :ivar type:
413- :vartype type: str
414- :ivar param:
415- :vartype param: str
416- :ivar code:
417- :vartype code: str
418- """
419-
420- message : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
421- type : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
422- param : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
423- code : Optional [str ] = rest_field (visibility = ["read" , "create" , "update" , "delete" , "query" ])
424-
425- @overload
426- def __init__ (
427- self ,
428- * ,
429- message : Optional [str ] = None ,
430- type : Optional [str ] = None ,
431- param : Optional [str ] = None ,
432- code : Optional [str ] = None ,
436+ error : "_models.AgentErrorDetail" ,
433437 ) -> None : ...
434438
435439 @overload
0 commit comments