Skip to content

Conversation

@tstadel
Copy link
Member

@tstadel tstadel commented Jan 23, 2026

Related Issues

  • fixes #issue-number

Proposed Changes:

  • support flattened verbosity generation_kwarg for OpenAIResponsesChatGenerator
  • fixed incorrect usage of OpenAI.responses.parse when no text_format type is given (to convert the response into this type)

How did you test it?

  • added verbosity to flattened generation_kwargs test
  • ran integration tests locally as well

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@tstadel tstadel requested a review from a team as a code owner January 23, 2026 10:18
@tstadel tstadel requested review from sjrl and removed request for a team January 23, 2026 10:18
@vercel
Copy link

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
haystack-docs Ignored Ignored Jan 23, 2026 10:18am

Request Review

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 21282692151

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 21 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 92.456%

Files with Coverage Reduction New Missed Lines %
components/generators/chat/openai_responses.py 21 87.54%
Totals Coverage Status
Change from base Build 21282343333: 0.02%
Covered Lines: 14780
Relevant Lines: 15986

💛 - Coveralls

Comment on lines +490 to +491
reasoning_effort = generation_kwargs.pop("reasoning_effort", None)
if reasoning_effort is not None:
Copy link
Member Author

Choose a reason for hiding this comment

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

Just some better null value handling. I.e. don't set it to the nested structure if the user set it to None.

@sjrl sjrl added this to the 2.23.0 milestone Jan 23, 2026
@sjrl sjrl self-assigned this Jan 23, 2026
Comment on lines +478 to +481
# if `text_format` is provided, we use the `parse` endpoint for response type parsing
if generation_kwargs.get("text_format"):
# if both `text_format` and `text` are provided, `text_format` takes precedence
# and json schema passed to `text` is ignored
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this a bug?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see that it was based on your release note

Copy link
Contributor

@sjrl sjrl left a comment

Choose a reason for hiding this comment

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

Looks good!

@tstadel tstadel merged commit 5ba08a7 into main Jan 23, 2026
22 checks passed
@tstadel tstadel deleted the enhancement/openai_responses_support_flat_verbosity_generation_kwarg branch January 23, 2026 11:42
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.

4 participants