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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
[0.3.15] - 2026-04-17
Fixed
PatchToolCallsCapability caused ValidationException: duplicate Ids on Bedrock when tools raised ModelRetry — when a tool raised ModelRetry, pydantic-ai records the retry as a RetryPromptPart (carrying the original tool_call_id) on the following ModelRequest, not as a ToolReturnPart. The patch processor only scanned for ToolReturnPart when deciding whether a ToolCallPart was orphaned, so it injected a synthetic ToolReturnPart with the same id — leaving the request with two parts sharing one tool_call_id. Strict providers (Bedrock minimax.minimax-m2.5 and others) rejected the request with The toolResult blocks at messages.N.content contain duplicate Ids. The processor now treats RetryPromptPart as a valid answer to a ToolCallPart, so no synthetic return is injected and the history remains valid. (#79, reported by @thatGreekGuy96)