• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agentjido / req_llm / a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132
52%
main: 49%

Build:
Build:
LAST BUILD BRANCH: feat/load-dotenv-config
DEFAULT BRANCH: main
Ran 26 Oct 2025 12:44AM UTC
Jobs 4
Files 83
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

26 Oct 2025 12:43AM UTC coverage: 52.26% (+0.1%) from 52.113%
a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132

Pull #132

github

mikehostetler
Add Anthropic prompt caching script and related functionality

- Introduced a new script `anthropic_prompt_caching.exs` to demonstrate the use of prompt caching with Anthropic models, including options for model selection, cache TTL, and logging levels.
- Enhanced the `ReqLLM.Providers.Anthropic` module to support prompt caching, including the addition of `anthropic_prompt_cache` and `anthropic_prompt_cache_ttl` options.
- Updated the request preparation process to inject cache control metadata into tools and system messages.
- Implemented usage tracking for cached tokens in the response handling, allowing for cost savings analysis.
- Added comprehensive unit tests for the new caching functionality, covering various scenarios including header injection and cache control handling.

These changes improve the efficiency and cost-effectiveness of using Anthropic models by leveraging prompt caching capabilities.
Pull Request #132: Add Anthropic prompt caching support

34 of 49 new or added lines in 4 files covered. (69.39%)

4 existing lines in 3 files now uncovered.

3608 of 6904 relevant lines covered (52.26%)

434.68 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
61.54
0.73% lib/req_llm/providers/anthropic/response.ex
2
75.52
-0.63% lib/req_llm/stream_server.ex
3
0.0
0.0% lib/mix/tasks/model_sync.ex
9
58.62
5.09% lib/req_llm/providers/anthropic.ex

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% lib/mix/tasks/model_sync.ex
1
58.62
5.09% lib/req_llm/providers/anthropic.ex
2
55.26
-2.63% lib/req_llm/streaming/finch_client.ex
Jobs
ID Job ID Ran Files Coverage
1 a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132.1 26 Oct 2025 12:44AM UTC 83
52.2
GitHub Action Run
2 a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132.2 26 Oct 2025 12:44AM UTC 83
52.19
GitHub Action Run
3 a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132.3 26 Oct 2025 12:44AM UTC 83
52.17
GitHub Action Run
4 a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132.4 26 Oct 2025 12:44AM UTC 83
52.16
GitHub Action Run
Source Files on build a377c25d71d9e982bbd2eb2a57ebb8403c95b7f1-PR-132
  • Tree
  • List 83
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #132
  • PR Base - main (#505C1862...)
  • 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