An attempt at fixing this was made in https://github.com/pydantic/pydantic-ai/pull/3165. That PR can likely be revived.