-
Notifications
You must be signed in to change notification settings - Fork 914
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
Get cost for an agent #323
Comments
This generally isn't part of most model providers SDKs. Would it make sense for you to use the usage information to calculate it? Maybe there's some library that can help with it? |
Yes it would be helpgul to track cost. I use this functionality provided by litellm currently in my app.
|
Yeah thats available here: https://openai.github.io/openai-agents-python/ref/result/#agents.result.RunResultBase.raw_responses So you can use the usage data to compute cost |
Wouldn't that be an issue for the reasoning models like o3-mini and o1 because the CoT is not part of the raw response? |
No, the reported tokens includes reasoning tokens. |
Can we get cost information as part for every .run call?
The text was updated successfully, but these errors were encountered: