You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: [Bug]: Every agent response fails with a Pydantic ValidationError #7048
Every agent response fails with a Pydantic ValidationError. The aggregate_to_response method in _mapper.py constructs InputTokensDetails(cached_tokens=0) — but openai-python added cache_write_tokens as a required field, so instantiation throws and the entire streaming execution aborts.
1 validation error for InputTokensDetails
cache_write_tokens
Field required [type=missing, input_value={'cached_tokens': 0}, input_type=dict]
🤖 Automated triage reproduction notes(agent-authored — trust but verify)
Agent analysis
Repro: InputTokensDetails(cached_tokens=0) at python/packages/devui/agent_framework_devui/_mapper.py lines 402, 415, and 1872 raises pydantic.ValidationError because openai>=2.45.0 added cache_write_tokens as a required field on openai.types.responses.response_usage.InputTokensDetails. Minimal repro: from openai.types.responses.response_usage import InputTokensDetails; InputTokensDetails(cached_tokens=0) — fix by adding cache_write_tokens=0 at all three sites.
Activity
[-]Python: [Bug]:[/-][+]Python: [Bug]: Every agent response fails with a Pydantic ValidationError[/+]github-actions commentedon Jul 10, 2026
🤖 Automated triage reproduction notes (agent-authored — trust but verify)
Agent analysis
Repro: InputTokensDetails(cached_tokens=0) at python/packages/devui/agent_framework_devui/_mapper.py lines 402, 415, and 1872 raises pydantic.ValidationError because openai>=2.45.0 added cache_write_tokens as a required field on openai.types.responses.response_usage.InputTokensDetails. Minimal repro:
from openai.types.responses.response_usage import InputTokensDetails; InputTokensDetails(cached_tokens=0)— fix by addingcache_write_tokens=0at all three sites.python/packages/devui/tests/devui/test_input_tokens_details_bug_7048.py1.0.0b2607091.0.0b260709subhrm commentedon Jul 11, 2026
Fixed by #7046