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

stacklok / toolhive-studio / 25870745122
70%

Build:
DEFAULT BRANCH: main
Ran 14 May 2026 04:08PM UTC
Jobs 1
Files 519
Run time 2min
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

14 May 2026 04:04PM UTC coverage: 70.689% (+0.3%) from 70.434%
25870745122

push

github

web-flow
feat(playground): show per-message cost using models.dev pricing (#2255)

* feat(playground): show per-message cost using models.dev pricing

Adds a per-message USD cost next to the existing token breakdown on
assistant messages. Cost is computed from models.dev pricing
(USD/1M tokens), fetched once and cached on disk for 24h in the main
process. Cached input tokens use the model's cache_read rate when
available. Providers/models with no pricing entry (local providers,
unknown models) render exactly as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(chat): drop unused ModelCost export from main pricing module

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(playground): address Copilot review feedback on chat cost

- useModelPricing now only enables its React Query fetch when a remote
  provider+model pair is known (skips ollama/lmstudio and the empty
  state). Avoids a no-op IPC + models.dev fetch for local-only users.
- Inline cost rendering no longer strips the dollar sign from the
  formatter output. The "<$0.01" case now reads correctly inline
  instead of "<0.01".
- Add unit tests for the main-process pricing module: cold-start
  fetch + write, warm disk cache within TTL, stale cache returns
  immediately + background refresh, offline with no disk cache, and
  non-OK upstream response.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

5107 of 7819 branches covered (65.32%)

67 of 76 new or added lines in 6 files covered. (88.16%)

7597 of 10747 relevant lines covered (70.69%)

116.48 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
0.0
renderer/src/features/chat/hooks/use-model-pricing.ts
1
98.0
main/src/chat/pricing.ts
1
0.0
main/src/ipc-handlers/chat/pricing.ts
Jobs
ID Job ID Ran Files Coverage
1 25870745122.1 14 May 2026 04:08PM UTC 519
70.69
GitHub Action Run
Source Files on build 25870745122
  • Tree
  • List 519
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25870745122
  • 064ce770 on github
  • Prev Build on main (#25864671450)
  • Next Build on main (#25870997471)
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