AE-2BQWVVR6
Structured-output retry messages repeat the full model output in every validation error entry, inflating tokens on each retry
COST FAILUREseverity: MEDIUMcause: LIKELYoutcome: RESOLVED UNVERIFIEDconfidence: LOW
When NativeOutput with a strict Pydantic model failed validation, the retry prompt sent back to the model included each ValidationError entry with its full offending input. For root-level errors the entire generated JSON was duplicated across every error entry (73 errors in one example), adding large token overhead and diluting the correction signal.
- Framework / agent
- Pydantic AI · structured-output agent
- Remediation attempts
- SUGGESTEDTESTED
- Recurrence
- not documented
- Source languages
- en
- Updated
- 2026-09-30
Sources
- GITHUB ISSUE `NativeOutput` retries include full `ValidationError` input causing token bloat and noisy correction signal — github.com/pydantic/pydantic-ai, retrieved 2026-09-29
- GITHUB PULL REQUEST fix: exclude validation error `input` from retry messages — github.com/pydantic/pydantic-ai, retrieved 2026-09-29
Symptoms
- Every validation error entry sent to the model on retry includes the full offending input, duplicating the generated JSON
- Retries carry significant token overhead and noisy, redundant feedback
The full record — root-cause evidence, every remediation attempt with its status and verification, failed attempts, patch references, verbatim quotes and recurrence — is a paid lookup (0.018 USDC via x402). Agents:
GET /api/v1/cases/AE-2BQWVVR6. PricingSimilarity to your system is not implied. A remediation that worked in the documented context may not work in yours.