Repository navigation
Python: fix(devui): fallback to empty string when reasoning chunk has no text - #9546
Open
Hardik K (hardikkaurani) wants to merge 2 commits into
Open
Hardik K (hardikkaurani) wants to merge 2 commits into
Hardik K (hardikkaurani) wants to merge 2 commits into
Conversation
Hardik K (hardikkaurani)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 19, 2026 19:59
Hardik K (hardikkaurani)
deployed
to
github-app-auth
October 19, 2026 19:59 — with
GitHub Actions
Active
Hardik K (hardikkaurani)
deployed
to
github-app-auth
October 19, 2026 19:59 — with
GitHub Actions
Active
Author
|
Hi Vincent Biret (@baywet) westey (@westey-m), submitted this PR to address #9533 where reasoning chunks with no text content cause Pydantic validation failure in DevUI _map_reasoning_content. Added unit tests covering both None and valid text scenarios. Ready for your review, thank you! |
Hardik K (hardikkaurani)
deployed
to
github-app-auth
October 20, 2026 16:47 — with
GitHub Actions
Active
Author
|
Vincent Biret (@baywet) The requested test-context fix is now in 04baa1e. Both reasoning-content tests initialize sequence_counter correctly, and local Python 3.11 DevUI tests plus targeted prek checks pass. Thank you for the review. |
Vincent Biret (baywet)
approved these changes
Oct 20, 2026
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Thank you for making the changes!
Vincent Biret (baywet)
enabled auto-merge
October 20, 2026 17:04
Author
|
appreciated for the review Vincent Biret (@baywet) |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes #9533: When running an agent with Gemini (or any client where a reasoning chunk has no text content),
content.textcan beNone. InMessageMapper._map_reasoning_content(agent_framework_devui/_mapper.py), passingdelta=content.textcauses Pydantic to raise:This PR:
delta=content.text or ""in_map_reasoning_contentto ensure valid string input forResponseReasoningTextDeltaEvent.python/packages/devui/tests/devui/test_mapper.pycovering reasoning content mapping with bothNoneand valid text.Fixes #9533
cc Vincent Biret (@baywet) westey (@westey-m)