Cache tokens in Logfire
Description
We are using Pydantic AI (1.0.7) with Logfire (4.7.0) with OpenAI chat completions API. Currently can't see cached tokens in Logfire, and it would be very helpful for us to track it to make sure we can hit the cache most times, and also track costs better.
Would it be in Logfire anytime soon?
i think you should be able to see that info in the attributes if you're using logfire.instrument_pydantic_ai()
We have instrument_pydantic_ai() enabled but can only see input and output tokens
(I will check maybe i need to pass instrument=True to agent, but i do think it works)
Ah, try upgrading pydantic-ai