Repository navigation
Python: Handle missing reasoning text in DevUI - #9543
Open
ZedingZhang (ZedingZhang) wants to merge 1 commit into
Open
ZedingZhang (ZedingZhang) wants to merge 1 commit into
ZedingZhang (ZedingZhang) wants to merge 1 commit into
Conversation
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 19, 2026 17:44 — with
GitHub Actions
Active
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 19, 2026 17:44 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized fix preserves the event contract, and regression coverage addresses the reported failure with no identified issues.
No open issues 🎉
What changed in this PR
Fixes #9533 by allowing DevUI to handle reasoning chunks with missing text without dropping the following answer.
Changes:
- Converts missing reasoning text to an empty string at the event boundary.
- Adds regression coverage for missing, empty, and ordinary reasoning text, including answer continuation.
| File | Description |
|---|---|
python/packages/devui/tests/devui/test_mapper.py |
Tests reasoning deltas, answer delivery, and absence of conversion warnings. |
python/packages/devui/agent_framework_devui/_mapper.py |
Adds the empty-string fallback for reasoning text. |
Review effort: Balanced
ZedingZhang (ZedingZhang)
marked this pull request as ready for review
October 20, 2026 01:19
ZedingZhang (ZedingZhang)
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 20, 2026 01:19
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 20, 2026 01:19 — with
GitHub Actions
Active
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 20, 2026 01:19 — with
GitHub Actions
Active
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 20, 2026 01:25 — with
GitHub Actions
Active
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 20, 2026 01:28 — with
GitHub Actions
Active
ZedingZhang (ZedingZhang)
deployed
to
github-app-auth
October 20, 2026 01:28 — with
GitHub Actions
Active
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.
Motivation & Context
DevUI turns a valid reasoning chunk with
text=Noneinto aResponseReasoningTextDeltaEventvalidation error and can discard the answer following it in the same update.Description & Review Guide
None, empty text, and ordinary reasoning text.Related Issue
Fixes #9533.
Trivial-change exception: this is an obvious correction of a valid optional value being passed to a string-only field, using the one-line fallback already proposed in the issue. The existing event contract is preserved.
AI Assistance
AI assistance details: OpenAI Codex prepared the implementation, regression tests, ablation experiments, and this description, and ran the local checks. Two independent Codex review contexts checked Standards and Spec. I have reviewed all submitted content and take resonsibility for it.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.