Skip to content

updated pydantic ai 0.2.4->1.41.0; better reporting of input token ca…#1

Open
KDwevedi wants to merge 1 commit into
OpenAgriNet:mainfrom
theflywheel:feat/update-pydantic-version
Open

updated pydantic ai 0.2.4->1.41.0; better reporting of input token ca…#1
KDwevedi wants to merge 1 commit into
OpenAgriNet:mainfrom
theflywheel:feat/update-pydantic-version

Conversation

@KDwevedi
Copy link
Copy Markdown

@KDwevedi KDwevedi commented Jan 14, 2026

…ching and cost

Context:

Observation: pydantic-ai(v0.2.4) currently deployed in production overestimates per-query costs in Logfire. This appears to be due to incorrect handling of input caching.

Proposed Fix: Upgrade pydantic-ai to the latest stable version (v1.41.0).

Validation: Two instances of the mh-oan-api service were deployed with identical environments with differing pydantic-ai versions and the required minor API compatibility changes.

Results: Cost reports for identical user queries show corrected accounting in the upgraded version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant