Skip to content

Commit 12af1be

Browse files
committed
chore(api): clarify agent session deletion
Castiron-Internal-PR: openai/openai-python-internal#472 Castiron-Source-SHA: 684d6a9b2fbbc1eb752eff90f53462bee7ebd8ed Castiron-Public-Base-SHA: 43b6ff6
1 parent 43b6ff6 commit 12af1be

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

‎.castiron.stats.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema_version: 1
2-
generation_id: b0f1a2bb-5d48-43d4-a0b8-f050b37cbbd9
3-
openapi_spec_hash: a1dc66efb759a0dc5b3b20904545890f
4-
openapi_transformed_spec_hash: 8e506c394d2f27f9329518058d5aa3b9
2+
generation_id: 9126dcfe-8d90-474b-94c3-e8385bd3789d
3+
openapi_spec_hash: 5e1804457f3d482bd25e99e86f1988d6
4+
openapi_transformed_spec_hash: 79577ce15c57e0d07a472e594c7bd768
55
config_hash: fb6bc01fab5ad1159ebbfcd9580b679d
6-
codegen_sha: 4a0c1dcef5111e4fdbec4bdbaf957055ec903856
7-
codegen_hash: fb2cfdf4eba8a2a31de14717d791ea94c01a844969ef43a116c576713d8ace9d
6+
codegen_sha: 544266af1a80139c2a0cafbad6e7192ffb79a6a5
7+
codegen_hash: ad5a89bfdc0b7ab49927c66b76475a9fa9a3e89a1147972d92a2a97a0b8a6270

‎api_reference/openapi.transformed.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34588,7 +34588,7 @@ paths:
3458834588
delete:
3458934589
operationId: deleteAgentSession
3459034590
summary: Delete an agent session
34591-
description: Removes a managed agent session from the public API and returns a deletion confirmation. If backend execution has ended, deletion can cancel a still-open public turn and abandon unpublished outputs. Running execution must be cancelled first. Physical cleanup may continue asynchronously. See [managing sessions](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage).
34591+
description: Removes a managed agent session from the public API and returns a deletion confirmation. If backend execution has ended, deletion can cancel a still-open public turn and abandon unpublished outputs. Deletion may stop an active turn. If an active turn prevents deletion, cancel it or wait for it to finish, then retry. Physical cleanup may continue asynchronously. See [managing sessions](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage).
3459234592
tags:
3459334593
- Agents
3459434594
parameters:

‎scripts/castiron/generated-files.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
},
336336
"src/openai/resources/beta/agents/sessions/sessions.py": {
337337
"mode": "100644",
338-
"sha256": "9c06955ff757005cdbca553ba06708755842299bd74e687c0a05a8d149dfa04b"
338+
"sha256": "258e60de2fb73ef434ac6433284dfc6c6f0ea8f4e682ff7d578ea16e80464924"
339339
},
340340
"src/openai/resources/beta/agents/sessions/subagents/__init__.py": {
341341
"mode": "100644",

‎src/openai/resources/beta/agents/sessions/sessions.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,9 @@ def delete(
492492
"""
493493
Removes a managed agent session from the public API and returns a deletion
494494
confirmation. If backend execution has ended, deletion can cancel a still-open
495-
public turn and abandon unpublished outputs. Running execution must be cancelled
496-
first. Physical cleanup may continue asynchronously. See
495+
public turn and abandon unpublished outputs. Deletion may stop an active turn.
496+
If an active turn prevents deletion, cancel it or wait for it to finish, then
497+
retry. Physical cleanup may continue asynchronously. See
497498
[managing sessions](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage).
498499
499500
Args:
@@ -936,8 +937,9 @@ async def delete(
936937
"""
937938
Removes a managed agent session from the public API and returns a deletion
938939
confirmation. If backend execution has ended, deletion can cancel a still-open
939-
public turn and abandon unpublished outputs. Running execution must be cancelled
940-
first. Physical cleanup may continue asynchronously. See
940+
public turn and abandon unpublished outputs. Deletion may stop an active turn.
941+
If an active turn prevents deletion, cancel it or wait for it to finish, then
942+
retry. Physical cleanup may continue asynchronously. See
941943
[managing sessions](https://developers.openai.com/api/docs/guides/agents-api/sessions/manage).
942944
943945
Args:

0 commit comments

Comments
 (0)