You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Add Response Cost Tracking to Usage Class
This feature introduces a new attribute, response_cost, to the Usage class to enable tracking of the total cost incurred from API responses. This addition enhances observability and cost management for developers using the OpenAI Agents SDK by making cost metrics available alongside existing usage metrics such as request count and token usage.
How it works:
A new field, response_cost: float = 0.0, is added to the Usage dataclass.
The add() method has been updated to correctly accumulate the response_cost from another Usage instance.
This allows developers to easily aggregate and monitor financial cost metrics in tandem with usage data.
Feature Request: Add Response Cost Tracking to Usage Class
This feature introduces a new attribute, response_cost, to the Usage class to enable tracking of the total cost incurred from API responses. This addition enhances observability and cost management for developers using the OpenAI Agents SDK by making cost metrics available alongside existing usage metrics such as request count and token usage.
How it works:
Example:
This addition is useful for developers needing cost-aware usage insights for budgeting, reporting, or scaling decisions.
The text was updated successfully, but these errors were encountered: