Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix #124 by allowing an empty object for Usage#add method #125

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

Merged
merged 3 commits into from
Jun 19, 2025
Merged

Conversation

seratch
Copy link
Member

@seratch seratch commented Jun 19, 2025

This pull request resolves #124

Copy link

changeset-bot bot commented Jun 19, 2025

🦋 Changeset detected

Latest commit: 0e0d522

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@openai/agents-core Patch
@openai/agents-openai Patch
@openai/agents-realtime Patch
@openai/agents Patch
@openai/agents-extensions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

this.inputTokensDetails.push(...newUsage.inputTokensDetails);
this.outputTokensDetails.push(...newUsage.outputTokensDetails);
if (newUsage.inputTokensDetails) {
// The type does not allow unddefined, but it could happen runtime
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in undefined both here and below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, resolved!

@seratch seratch merged commit 9028df4 into main Jun 19, 2025
5 checks passed
@seratch seratch deleted the issue-124 branch June 19, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom model provider raises an error when usage object does not have some properties
2 participants