Skip to content

Serialize structured realtime tool outputs as JSON#2608

Merged
seratch merged 5 commits intoopenai:mainfrom
lavish0000:fix/realtime-tool-output-json-1847
Mar 6, 2026
Merged

Serialize structured realtime tool outputs as JSON#2608
seratch merged 5 commits intoopenai:mainfrom
lavish0000:fix/realtime-tool-output-json-1847

Conversation

@lavish0000
Copy link
Contributor

Summary

  • serialize structured realtime tool results to JSON instead of stringifying Python objects
  • keep plain string outputs unchanged while handling Pydantic models and dataclasses predictably
  • add regression coverage for dict and model-based tool return values

Test plan

  • make sync
  • make format
  • make lint
  • make mypy
  • make tests

Issue number

Closes #1847

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@github-actions github-actions bot added dependencies documentation Improvements or additions to documentation feature:realtime project labels Mar 6, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e47832388

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch
Copy link
Member

seratch commented Mar 6, 2026

Thanks for sending this patch. The change could resolve the issue, but could you repeat Codex's reviews by fixing the comments and then @codex review again until you get 👍 from Codex?

@seratch seratch marked this pull request as draft March 6, 2026 05:16
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e47832388

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lavish0000
Copy link
Contributor Author

@codex review again

@lavish0000
Copy link
Contributor Author

@codex review

@lavish0000
Copy link
Contributor Author

@codex review again

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lavish0000 lavish0000 marked this pull request as ready for review March 6, 2026 12:52
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6abc0de11b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lavish0000
Copy link
Contributor Author

@codex review

@lavish0000
Copy link
Contributor Author

@codex review again

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch seratch removed dependencies documentation Improvements or additions to documentation labels Mar 6, 2026
@seratch seratch added this to the 0.11.x milestone Mar 6, 2026
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

LGTM

@seratch seratch merged commit 696a9a8 into openai:main Mar 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON serialization for tool outputs in RealtimeSession

2 participants