Skip to content

Commit 8ddd960

Browse files
feat(api): add is error to tools
1 parent b68c413 commit 8ddd960

6 files changed

Lines changed: 93 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 64
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-cd43ba4b554ca024dd7ee7b74e4f4700a743282c17def704a0967e6ff251c09b.yml
3-
openapi_spec_hash: 9369ccc9c0289e9d6f641a526d244d1c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-ae2571b5ac5d337ba5ced527cec0ff6e3088296fa67c3c836ed5a06544b25cb8.yml
3+
openapi_spec_hash: 962a2f20444c7823fd3a34f95365146e
44
config_hash: 138b7c0b394e7393133c8ff16a6d0eb3

src/agentex/resources/messages/messages.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,19 @@ def list(
670670
"default": null,
671671
"description": "The result of the tool.",
672672
"title": "Content"
673+
},
674+
"is_error": {
675+
"anyOf": [
676+
{
677+
"type": "boolean"
678+
},
679+
{
680+
"type": "null"
681+
}
682+
],
683+
"default": null,
684+
"description": "Whether the tool call resulted in an error. `None` when the harness does not report a status.",
685+
"title": "Is Error"
673686
}
674687
},
675688
"title": "ToolResponseContentEntityOptional",
@@ -1237,6 +1250,19 @@ def list_paginated(
12371250
"default": null,
12381251
"description": "The result of the tool.",
12391252
"title": "Content"
1253+
},
1254+
"is_error": {
1255+
"anyOf": [
1256+
{
1257+
"type": "boolean"
1258+
},
1259+
{
1260+
"type": "null"
1261+
}
1262+
],
1263+
"default": null,
1264+
"description": "Whether the tool call resulted in an error. `None` when the harness does not report a status.",
1265+
"title": "Is Error"
12401266
}
12411267
},
12421268
"title": "ToolResponseContentEntityOptional",
@@ -1943,6 +1969,19 @@ async def list(
19431969
"default": null,
19441970
"description": "The result of the tool.",
19451971
"title": "Content"
1972+
},
1973+
"is_error": {
1974+
"anyOf": [
1975+
{
1976+
"type": "boolean"
1977+
},
1978+
{
1979+
"type": "null"
1980+
}
1981+
],
1982+
"default": null,
1983+
"description": "Whether the tool call resulted in an error. `None` when the harness does not report a status.",
1984+
"title": "Is Error"
19461985
}
19471986
},
19481987
"title": "ToolResponseContentEntityOptional",
@@ -2510,6 +2549,19 @@ async def list_paginated(
25102549
"default": null,
25112550
"description": "The result of the tool.",
25122551
"title": "Content"
2552+
},
2553+
"is_error": {
2554+
"anyOf": [
2555+
{
2556+
"type": "boolean"
2557+
},
2558+
{
2559+
"type": "null"
2560+
}
2561+
],
2562+
"default": null,
2563+
"description": "Whether the tool call resulted in an error. `None` when the harness does not report a status.",
2564+
"title": "Is Error"
25132565
}
25142566
},
25152567
"title": "ToolResponseContentEntityOptional",

src/agentex/types/message_list_paginated_params.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,19 @@ class MessageListPaginatedParams(TypedDict, total=False):
470470
"default": null,
471471
"description": "The result of the tool.",
472472
"title": "Content"
473+
},
474+
"is_error": {
475+
"anyOf": [
476+
{
477+
"type": "boolean"
478+
},
479+
{
480+
"type": "null"
481+
}
482+
],
483+
"default": null,
484+
"description": "Whether the tool call resulted in an error. `None` when the harness does not report a status.",
485+
"title": "Is Error"
473486
}
474487
},
475488
"title": "ToolResponseContentEntityOptional",

src/agentex/types/message_list_params.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,19 @@ class MessageListParams(TypedDict, total=False):
466466
"default": null,
467467
"description": "The result of the tool.",
468468
"title": "Content"
469+
},
470+
"is_error": {
471+
"anyOf": [
472+
{
473+
"type": "boolean"
474+
},
475+
{
476+
"type": "null"
477+
}
478+
],
479+
"default": null,
480+
"description": "Whether the tool call resulted in an error. `None` when the harness does not report a status.",
481+
"title": "Is Error"
469482
}
470483
},
471484
"title": "ToolResponseContentEntityOptional",

src/agentex/types/tool_response_content.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ class ToolResponseContent(BaseModel):
2525
tool_call_id: str
2626
"""The ID of the tool call that is being responded to."""
2727

28+
is_error: Optional[bool] = None
29+
"""Whether the tool call resulted in an error.
30+
31+
`None` when the harness does not report a status.
32+
"""
33+
2834
style: MessageStyle = "static"
2935
"""The style of the message.
3036

src/agentex/types/tool_response_content_param.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Literal, Required, TypedDict
67

78
from .message_style import MessageStyle
@@ -26,6 +27,12 @@ class ToolResponseContentParam(TypedDict, total=False):
2627
tool_call_id: Required[str]
2728
"""The ID of the tool call that is being responded to."""
2829

30+
is_error: Optional[bool]
31+
"""Whether the tool call resulted in an error.
32+
33+
`None` when the harness does not report a status.
34+
"""
35+
2936
style: MessageStyle
3037
"""The style of the message.
3138

0 commit comments

Comments
 (0)