Skip to content

Commit b06bd6c

Browse files
alexmojakiDouweM
andauthored
Update genai-prices, fix default api_flavor, fixes anthropic usage extraction (#3226)
Co-authored-by: Douwe Maan <[email protected]>
1 parent e7171f3 commit b06bd6c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pydantic_ai_slim/pydantic_ai/usage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def extract(
140140
provider: str,
141141
provider_url: str,
142142
provider_fallback: str,
143-
api_flavor: str | None = None,
143+
api_flavor: str = 'default',
144144
details: dict[str, Any] | None = None,
145145
) -> RequestUsage:
146146
"""Extract usage information from the response data using genai-prices.

pydantic_ai_slim/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies = [
6060
"exceptiongroup; python_version < '3.11'",
6161
"opentelemetry-api>=1.28.0",
6262
"typing-inspection>=0.4.0",
63-
"genai-prices>=0.0.31",
63+
"genai-prices>=0.0.35",
6464
]
6565

6666
[tool.hatch.metadata.hooks.uv-dynamic-versioning.optional-dependencies]

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)