• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Warning: This build has drifted.
The coverage report for this pull request build may be inaccurate because its base commit is no longer the HEAD of its target branch.
This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

    • Learn more: For more information on this, see Tracking coverage changes for pull request builds.
    • Fix now: For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
    • Prevent going forward: To avoid this issue with future PRs, see these Recommended CI Configurations.
New Repo Setting:
INCLUDE COVERAGE % WITH WARNINGS ABOUT DRIFTED BUILDS?

Enabling this setting will include a (potentially inaccurate) coverage % with warning messages in status updates for drifted builds.

Adjust setting

agentjido / req_llm / d5af793aea4f0a4fb1943d0495ad9a9d92b05ce7-PR-35
59%
main: 49%

Build:
Build:
LAST BUILD BRANCH: feat/load-dotenv-config
DEFAULT BRANCH: main
Ran 24 Sep 2025 09:54PM UTC
Jobs 2
Files 56
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2025 09:53PM UTC coverage: 58.542% (+0.7%) from 57.807%
d5af793aea4f0a4fb1943d0495ad9a9d92b05ce7-PR-35

Pull #35

github

mikehostetler
Enhance Google provider usage extraction and token handling

- Updated the `extract_usage/2` function in the Google provider to include cached content token handling, improving the accuracy of usage metrics.
- Introduced a new private function, `add_cached_tokens/1`, to manage the addition of cached tokens to the usage data.
- Refactored the `ReqLLM.Step.Usage` module to streamline cached token retrieval and clamping logic, ensuring consistent behavior across different scenarios.
- Added comprehensive tests for cached token scenarios in both the Google provider and usage handling, ensuring robust validation of new functionality.

These changes enhance the overall functionality and reliability of the usage calculation features within the ReqLLM library, providing better support for diverse provider interactions.
Pull Request #35: Fix #31: Add cost calculation to Response.usage()

61 of 61 new or added lines in 3 files covered. (100.0%)

21 existing lines in 4 files now uncovered.

1710 of 2921 relevant lines covered (58.54%)

318.5 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
86.67
-3.33% lib/req_llm/keys.ex
5
83.82
-0.35% lib/req_llm/provider/defaults.ex
5
89.16
-0.38% lib/req_llm/providers/xai.ex
10
72.73
1.93% lib/req_llm/providers/anthropic.ex
Jobs
ID Job ID Ran Files Coverage
1 d5af793aea4f0a4fb1943d0495ad9a9d92b05ce7-PR-35.1 24 Sep 2025 09:54PM UTC 56
58.54
GitHub Action Run
2 d5af793aea4f0a4fb1943d0495ad9a9d92b05ce7-PR-35.2 24 Sep 2025 09:54PM UTC 56
58.44
GitHub Action Run
Source Files on build d5af793aea4f0a4fb1943d0495ad9a9d92b05ce7-PR-35
  • Tree
  • List 56
  • Changed 14
  • Source Changed 0
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #35
  • PR Base - main (#B699102C...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc