Skip to content

OpenAI Token Counting#1751

Merged
hmstepanek merged 5 commits into
mainfrom
feat-openai-token-counting
Jun 17, 2026
Merged

OpenAI Token Counting#1751
hmstepanek merged 5 commits into
mainfrom
feat-openai-token-counting

Conversation

@TimPansino

Copy link
Copy Markdown
Contributor

Overview

  • Add token counting to OpenAI SDK for all LLM invocations.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 9 0 0 1.21s
✅ MARKDOWN markdownlint 7 0 0 0 1.41s
✅ PYTHON ruff 1039 0 0 0 1.01s
✅ PYTHON ruff-format 1039 0 0 0 0.46s
✅ YAML prettier 23 0 0 0 1.64s
✅ YAML v8r 23 0 0 6.16s
✅ YAML yamllint 23 0 0 0.71s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@codecov-commenter

codecov-commenter commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.06%. Comparing base (18602dd) to head (5d4783a).

Files with missing lines Patch % Lines
newrelic/hooks/mlmodel_openai.py 93.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1751      +/-   ##
==========================================
- Coverage   82.09%   82.06%   -0.04%     
==========================================
  Files         215      215              
  Lines       26468    26496      +28     
  Branches     4183     4190       +7     
==========================================
+ Hits        21730    21744      +14     
- Misses       3306     3315       +9     
- Partials     1432     1437       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mergify mergify Bot added the tests-failing Tests failing in CI. label Jun 2, 2026
@TimPansino TimPansino marked this pull request as ready for review June 16, 2026 16:33
@TimPansino TimPansino requested a review from a team as a code owner June 16, 2026 16:33
@TimPansino TimPansino force-pushed the feat-openai-token-counting branch from 458c39e to d104069 Compare June 16, 2026 16:34
@mergify mergify Bot removed the tests-failing Tests failing in CI. label Jun 16, 2026
@TimPansino TimPansino requested a review from hmstepanek June 16, 2026 17:27
@hmstepanek hmstepanek merged commit 8e0d575 into main Jun 17, 2026
65 checks passed
@hmstepanek hmstepanek deleted the feat-openai-token-counting branch June 17, 2026 17:14
@hmstepanek hmstepanek added this to the v13.2.0 milestone Jul 6, 2026
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.

3 participants