Skip to content

docs(openai): update token usage docs - #16528

Merged
n1ckoates merged 2 commits into
mainfrom
nick/update-openai-usage-docs
Jun 30, 2026
Merged

docs(openai): update token usage docs#16528
n1ckoates merged 2 commits into
mainfrom
nick/update-openai-usage-docs

Conversation

@n1ckoates

Copy link
Copy Markdown
Member

Background

Cached token and reasoning token usage is available under usage.inputTokenDetails and usage.inputTokenDetails.cacheReadTokens respectively, instead of in providerMetadata, but the docs for the openai provider were not updated.

Summary

Updated docs to use the new properties

Manual Verification

Checked that these properties exist when using the openai provider

Checklist

  • All commits are signed (PRs with unsigned commits cannot be merged)
  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Related Issues

Fixed #8426, which was due to incorrect docs

@n1ckoates
n1ckoates enabled auto-merge (squash) June 30, 2026 22:14
@n1ckoates
n1ckoates merged commit 3884678 into main Jun 30, 2026
46 of 47 checks passed
@n1ckoates
n1ckoates deleted the nick/update-openai-usage-docs branch June 30, 2026 22:20
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.

Unable to view openai cachedPromptTokens in providerMetadata

3 participants