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

stacklok / toolhive / 24980886573
67%

Build:
DEFAULT BRANCH: main
Ran 27 Apr 2026 07:01AM UTC
Jobs 1
Files 665
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

27 Apr 2026 06:54AM UTC coverage: 66.265% (-0.003%) from 66.268%
24980886573

push

github

web-flow
Add localhost reverse proxy for LLM gateway (#5035)

* Add localhost reverse proxy for LLM gateway

Implements a background daemon that bridges AI tools using static API
keys (e.g. Cursor) to an OIDC-protected LLM gateway.

New pkg/llm/proxy package:
- proxy.go: httputil.ReverseProxy wrapper that strips incoming
  Authorization headers, injects fresh OIDC tokens, and forwards to
  the configured gateway. Binds listener in New() so Addr() is valid
  before Start(). Loopback guard rejects non-localhost listen addrs.
  SSE streaming works without buffering (FlushInterval: -1). Graceful
  5-second shutdown on context cancellation.
- daemon.go: PID-file lifecycle (IsRunning, Stop, StartDetached).
  StartDetached forks the current binary with TOOLHIVE_DETACHED=1,
  redirecting stdout/stderr to the XDG log file.
- daemon_unix.go / daemon_windows.go: platform-specific processAlive
  and SysProcAttr helpers via build tags.

CLI wiring (cmd/thv/app/llm.go):
- thv llm proxy start [--foreground]: background by default, foreground
  with --foreground or when running as detached child.
- thv llm proxy stop: sends SIGTERM via process.KillProcess and removes
  PID file.

Closes: #5029

* changes from review

* changes from review

---------

Co-authored-by: taskbot <taskbot@users.noreply.github.com>

119 of 199 new or added lines in 4 files covered. (59.8%)

8 existing lines in 4 files now uncovered.

59332 of 89537 relevant lines covered (66.27%)

61.75 hits per line

Uncovered Changes

Lines Coverage ∆ File
48
0.0
0.0% cmd/thv/app/llm.go
26
78.15
pkg/llm/proxy/proxy.go
4
63.64
-0.49% pkg/llm/tokensource.go
2
92.37
-0.18% pkg/networking/utilities.go

Coverage Regressions

Lines Coverage ∆ File
3
71.85
-1.11% pkg/ignore/processor.go
2
73.63
1.29% pkg/runner/config.go
2
51.22
-0.19% pkg/workloads/manager.go
1
0.0
0.0% cmd/thv/app/llm.go
Jobs
ID Job ID Ran Files Coverage
1 24980886573.1 27 Apr 2026 07:01AM UTC 665
66.27
GitHub Action Run
Source Files on build 24980886573
  • Tree
  • List 665
  • Changed 6
  • Source Changed 3
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24980886573
  • d8d58ca5 on github
  • Prev Build on main (#24925755009)
  • Next Build on main (#24988918773)
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