Repository navigation
fix(api): remove a nonpublic Managed Agents turn error - #4288
markstuart-oai wants to merge 1 commit into
Conversation
Castiron-Internal-PR: openai/openai-python-internal#434 Castiron-Source-SHA: ccb3797f51d81c685a60fd5b5afe900c4589b829 Castiron-Public-Base-SHA: f56a67f
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed the exact current commit. No actionable findings. The schema and generated types consistently remove the nonpublic SessionTurnError member; generic SessionError codes remain string-valued, so opaque stream errors still precede the typed agent.session.budget_reached event. Reviewed both creation and subscription paths, existing budget-event coverage, and generated-file manifest hashes. The named constant/literal removal is an intentional compatibility change documented in this PR.
Hosted CI: 17 success, 9 skipped. Static review with independent review; no candidate code or local tests executed.
) ## Summary The SDK has been exposing Managed Agents session budget controls as public types. This update removes the alpha budget API from those types. This is an alpha breaking change for a **minor** release. If your application depends on these members, stay on the previous SDK until you can remove those references. There is no replacement typed budget API in this release. ## Changes - Session requests and responses no longer declare `spend_control`. - The public event and status types no longer declare `agent.session.budget_reached` or `budget_reached`. Code that names these members needs to change before upgrading. This also includes the turn-error code removal from #4288. This PR supersedes that narrower change; the old PR does not need to land first. ## Verification The 278 focused SDK tests have been passing (6 skipped), along with Ruff and formatting. The tests cover preserving a generic error, ignoring unrelated unknown frames, and ending a helper's wait when a matching opaque budget frame arrives. Co-authored-by: markstuart-oai <323302876+markstuart-oai@users.noreply.github.com>
Summary
The SDK has been listing
session_budget_exceededas a public session turn error. The public API no longer advertises that value.Changes
session_budget_exceededas a knownSessionTurnError.codemay need to change. To detect a session hitting its budget, listen foragent.session.budget_reached.Verification
The focused stream tests have been passing (92 cases), along with 32 cases using
session_budget_exceededas an opaque stream-error code. Both session creation and subscription have been delivering the typedagent.session.budget_reachedevent after that error. StrictSessionTurnErrorvalidation has been rejecting the removed enum member.