Pydantic AI
Pydantic AI is a Python integration — install the extra and every model request, and its tool calls, are metered.
Pydantic AI is a Python integration. Install the extra and init as usual — see init parameters. TokenPolice meters each model request and attributes it to Pydantic AI, so one dashboard entry represents the whole call even though an OpenAI / Anthropic / Gemini client runs underneath. Tool calls get their own steps in the trace automatically.
pip install "token-police[pydantic-ai]"The integration is version-tolerant: if a particular Pydantic AI / provider combination can't be wired, it fails open — your app keeps running, that call just isn't metered. Nothing to configure.
Reroute does not switch the model on Pydantic AI
A Reroute rule does not switch the model on Pydantic AI — those calls still run on the original model. Metering and blocking work normally. See Actions.

