Skip to content

Deprecate Usage in favour of RequestUsage and RunUsage to work with genai-prices #2378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Jul 30, 2025

Copy link
Contributor

hyperlint-ai bot commented Jul 30, 2025

PR Change Summary

Introduced a new Usage interface to enhance compatibility with the genai-prices library.

  • Updated the Usage interface to replace 'request_tokens' and 'response_tokens' with 'input_tokens' and 'output_tokens'.
  • Modified multiple documentation files to reflect the new Usage structure.
  • Ensured consistency across examples and usage outputs in the documentation.

Modified Files

  • docs/agents.md
  • docs/direct.md
  • docs/message-history.md
  • docs/models/index.md
  • docs/models/openai.md
  • docs/multi-agent-applications.md
  • docs/output.md
  • docs/testing.md
  • docs/tools.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

Copy link

github-actions bot commented Aug 8, 2025

Docs Preview

commit: 05020aa
Preview URL: https://976b9440-pydantic-ai-previews.pydantic.workers.dev

@alexmojaki alexmojaki changed the title new Usage interface to work with genai-prices Deprecate Usage in favour of RequestUsage and RunUsage to work with genai-prices Aug 12, 2025
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.

Integrate genai-prices
2 participants