Repository navigation
Description
Observed Behavior
Running an agent with GeminiChatClient (gemini-3.5-flash-lite) through DevUI, the server logs this on the first prompt:
Error converting agent update: 1 validation error for ResponseReasoningTextDeltaEvent
delta
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
The agent still runs, but that update is dropped.
It comes from _map_reasoning_content in agent_framework_devui/_mapper.py, which does:
return ResponseReasoningTextDeltaEvent(
type="response.reasoning_text.delta",
delta=content.text,
...
)
When Gemini sends a reasoning chunk with no text, content.text is None and validation fails.
Expected Behavior
Reasoning deltas with no text should not cause a validation error. The update should either use an empty string or be skipped cleanly so the rest of the stream continues without log noise.
Steps to Reproduce
- Install agent-framework, agent-framework-devui, and agent-framework-gemini.
- Run the minimal script below (set your Gemini API key in the environment).
- Open the DevUI page that appears.
- Send any prompt that causes the model to produce reasoning (e.g. a short planning or multi-step question).
- Check the server console for the validation error on ResponseReasoningTextDeltaEvent.
Minimal Reproduction
from agent_framework import Agent
from agent_framework.devui import serve
from agent_framework.gemini import GeminiChatClient
client = GeminiChatClient(model="gemini-3.5-flash-lite")
worker = Agent(
client=client,
name="worker",
instructions="You are a helpful assistant."
)
serve(
entities=[worker],
port=8000,
auto_open=True,
auth_enabled=False
)Error Messages and Stack Traces
1 validation error for ResponseReasoningTextDeltaEvent
delta
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.14/v/string_type
Package Versions
agent-framework==1.19.0
agent-framework-devui==1.0.0b261008
agent-framework-gemini==1.0.0b260910
Python Version
Python 3.14
Operating System
Windows
Regression
Unknown
Additional Context
Proposed fix
In agent_framework_devui/_mapper.py, around line 1426, in MessageMapper._map_reasoning_content, I changed:
delta=content.text,to:
delta=content.text or "",This change provides an empty-string fallback when content.text is None or empty, preventing potential issues with missing reasoning content.
Acknowledgements
- I searched existing issues and did not find a duplicate.
- I personally verified this behavior and the reproduction details are authentic.
- I will wait for explicit maintainer agreement before starting implementation of a non-trivial change.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Oct 19, 2026
🤖 Automated triage reproduction notes (agent-authored — trust but verify)
Agent analysis
The bug occurs in
python/packages/devui/agent_framework_devui/_mapper.py::MessageMapper._map_reasoning_contentwhen validContent.from_text_reasoning(text=None)content reaches the string-onlyResponseReasoningTextDeltaEvent.deltafield. Minimal repro: pass that content throughMessageMapper.convert_eventin anAgentResponseUpdateand observe the validation warning and emitted error event.python/packages/devui/tests/devui/test_mapper.py::test_reasoning_content_without_text_does_not_emit_erroragent-framework-devui>=1.0b2610081.0.0b261015Python: fix(devui): fallback to empty string when reasoning chunk has…