`RequestUsage.extract` 会捕获所有异常,并返回一个伪造的零使用量
作者: jliew创建于 2026年8月27日更新于 2026年9月18日
标签p:2-highattention-escalated
`RequestUsage.extract` wraps its entire provider loop in a bare `except Exception: pass`, then falls through to `return cls(details=details)`, a zeroed `RequestUsage`. `pydantic_ai/usage.py`, current `main` / v2.35.0:
内容来源: pydantic/pydantic-ai