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

stacklok / toolhive / 28858636135
68%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 10:20AM UTC
Jobs 1
Files 796
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

07 Jul 2026 10:13AM UTC coverage: 67.961% (+0.03%) from 67.932%
28858636135

push

github

web-flow
Add Claude Desktop as an LLM gateway client (#5712)

* Add Claude Desktop as an LLM gateway client

thv llm setup can route Claude Code and several editors through an
OIDC-protected LLM gateway, but not Claude Desktop. Claude Desktop
exposes a different configuration surface — its "third-party inference"
(Cowork 3P) model — which uses a configLibrary document plus a
_meta.json selector and a credential-helper executable, none of which
fit the existing JSON-key-patching path.

Add a credential-helper client mode that reuses "thv llm token":

- New ClaudeDesktop client with LLMGatewayMode "credential-helper".
  Writes a <uuid>.json config document (inferenceProvider/gateway URL/
  helper-script kind/models) and merges a _meta.json selector, preserving
  any user-owned entries. Generates a no-arg shim that execs
  "thv llm token" (browser only in the interactive helper context).
- Detect Claude Desktop by its app-support directory (a GUI app, not on
  $PATH); warn when a managed-preferences profile would override the
  local config; tell the user to relaunch (config is read at launch).
- Teardown removes the entry, config document, and shim, and clears
  appliedId only when it pointed at ToolHive's config.
- New --models flag feeds inferenceModels; the key is omitted when empty
  so the app can fall back to gateway model discovery once available.

Verified end-to-end against a real Claude Desktop install (config
applied, live inference on all models) plus unit and e2e coverage.

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

* Address review: safer teardown ordering and cleanup

- revertCredentialHelper: de-reference _meta.json and delete the config
  document before removing the shim, so a mid-revert failure never leaves
  Claude Desktop pointing at a config that references a missing helper.
  Treat an empty configPath as a no-op (do not touch the shim when we
  cannot confirm the selector no longer references it).
- configureCred... (continued)

256 of 329 new or added lines in 4 files covered. (77.81%)

18 existing lines in 5 files now uncovered.

73060 of 107503 relevant lines covered (67.96%)

64.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
63
76.75
pkg/client/llm_gateway_credential_helper.go
6
76.03
-0.25% pkg/client/llm_gateway.go
4
68.26
0.29% cmd/thv/app/llm.go

Coverage Regressions

Lines Coverage ∆ File
6
72.15
-1.9% pkg/runner/config.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
80.56
-0.7% pkg/transport/proxy/httpsse/http_proxy.go
2
94.0
-1.33% pkg/authserver/storage/cimd_decorator.go
1
67.3
0.43% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 28858636135.1 07 Jul 2026 10:20AM UTC 796
67.96
GitHub Action Run
Source Files on build 28858636135
  • Tree
  • List 796
  • Changed 13
  • Source Changed 5
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28858636135
  • 5e3e7427 on github
  • Prev Build on main (#28852900937)
  • Next Build on main (#28858798601)
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