Skip to content

fix(api): remove a nonpublic Managed Agents turn error - #1413

Closed
markstuart-oai wants to merge 1 commit into
mainfrom
castiron/promotions/pr-485
Closed

markstuart-oai wants to merge 1 commit into
mainfrom
castiron/promotions/pr-485

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The SDK has been listing session_budget_exceeded as a public session turn error. The public API no longer advertises that value.

Changes

  • Code that refers to session_budget_exceeded as a known SessionTurnError.code may need to change. To detect a session hitting its budget, listen for agent.session.budget_reached.

Verification

The 34 focused Java tests have been passing. Strict turn-error validation has been rejecting the removed known value, while the generic stream error has been preserving the raw code session_budget_exceeded. Both sync and async streams have been delivering that error followed by the typed agent.session.budget_reached event.

Castiron-Internal-PR: openai/openai-java-internal#485
Castiron-Source-SHA: 2c997438f45df6cb962fe8a4dd420783fd94d973
Castiron-Public-Base-SHA: c1abbf1
@markstuart-oai
markstuart-oai requested a review from a team as a code owner November 18, 2026 04:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T04:27:31.266340Z e1d9daf PR opened
🔒 Security Review ✅ Completed 2026-11-18T04:28:33.999824Z e1d9daf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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 jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No actionable findings at this commit. The schema and all Java enum representations consistently remove the nonpublic turn-error member. Unknown codes retain their raw string representation, while generic SessionError.code remains independent and string-valued. Reviewed sync/async creation and subscription handling, typed budget events, existing regression coverage, and the matching generated-file hash. Removal of the named constant is the intentional compatibility change documented in the PR.

Hosted CI at publication: 11 success, 2 in_progress. Static review with independent review; no candidate code or local tests executed.

VitorEAFeliciano pushed a commit to Navegos/openai-java that referenced this pull request Nov 28, 2026
…enai#1414)

## 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 openai#1413. This PR
supersedes that narrower change; the old PR does not need to land first.

## Verification

All 139 focused Java tests and Kotlin lint have been passing. The ten
open-stream probes have been covering closure after an opaque budget
event for sync, async and handler callers; unrelated or malformed events
have not been ending the wait. Reflection has been confirming that the
former public budget event, status member and spend-control accessors
are absent.

Co-authored-by: markstuart-oai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants