Skip to content

feat(openai): Response API support for reasoning summaries, stateful conversations, and Zero Data Retention #8090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025

Conversation

benjamincburns
Copy link
Collaborator

@benjamincburns benjamincburns commented Apr 29, 2025

Includes the following changes:

  • Updates to latest OpenAI SDK version
  • Adds zdrEnabled constructor option to ChatOpenAI, which to disables automatic ChatOpenAI features that depend on OpenAI data storage
  • Populates previous_response_id automatically by default, unless ZDR is enabled.
  • Populates the ID of previous message items when using the Responses API, unless ZDR is enabled.
  • Deprecates reasoningEffort and reasoning_effort parameters in favor of the forwarded OpenAI reasoning object
    • These deprecated parameters are still respected if they are provided
  • Adds missing fields to the lc_serializable_keys property
  • Improves API docs to detail cases when the responses API will or won't be used.

Fixes #8088.

Copy link

vercel bot commented Apr 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 3:21am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Apr 30, 2025 3:21am

@benjamincburns benjamincburns force-pushed the ben/oai-reasoning-summaries branch from 4e41741 to a213e6c Compare April 30, 2025 02:02
@benjamincburns benjamincburns marked this pull request as ready for review April 30, 2025 02:02
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. auto:improvement Medium size change to existing code to handle new use-cases labels Apr 30, 2025
@@ -173,44 +173,46 @@ export class DallEAPIWrapper extends Tool {
): MessageContentImageUrl[] {
Copy link
Collaborator Author

@benjamincburns benjamincburns Apr 30, 2025

Choose a reason for hiding this comment

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

The changes in this file were a result of the OpenAI SDK update - they apparently included a breaking change that made data an optional.

@benjamincburns benjamincburns force-pushed the ben/oai-reasoning-summaries branch from df3607b to 378d476 Compare April 30, 2025 02:22
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 30, 2025
@benjamincburns benjamincburns force-pushed the ben/oai-reasoning-summaries branch from 0d48c95 to 1cb09a5 Compare April 30, 2025 02:58
@benjamincburns benjamincburns changed the title feat(openai): support reasoning summaries and previous_response_id feat(openai): Response API support for reasoning summaries, stateful conversations, and Zero Data Retention Apr 30, 2025
@benjamincburns benjamincburns merged commit e4d8ac0 into main Apr 30, 2025
14 of 15 checks passed
@benjamincburns benjamincburns deleted the ben/oai-reasoning-summaries branch April 30, 2025 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Support for OpenAI Reasoning Summaries
1 participant