Problem
thv llm proxy only exposes a start subcommand. There is no way to:
- Stop a background proxy that was launched by
thv llm setup or thv llm proxy start, short of running thv llm teardown (which also reconfigures all tools)
- Check whether the proxy is currently running and on which port
StopProxyBackground and PidFilePath already exist in pkg/llm/setup.go and are called internally by teardown — they just aren't exposed as CLI commands.
Proposed commands
thv llm proxy stop
Reads the PID file (llm-proxy.pid) and sends SIGTERM to the proxy process. Prints a message if no proxy is running.
thv llm proxy status
Checks the PID file to determine whether the proxy is running, then prints:
- Running status (yes/no)
- PID and listen address if running
- Upstream gateway URL
Acceptance Criteria
References
pkg/llm/setup.go — StopProxyBackground, PidFilePath (already implemented, just not exposed)
cmd/thv/app/llm.go — newLLMCmd, proxyCmd (add subcommands here)
Problem
thv llm proxyonly exposes astartsubcommand. There is no way to:thv llm setuporthv llm proxy start, short of runningthv llm teardown(which also reconfigures all tools)StopProxyBackgroundandPidFilePathalready exist inpkg/llm/setup.goand are called internally byteardown— they just aren't exposed as CLI commands.Proposed commands
thv llm proxy stopReads the PID file (
llm-proxy.pid) and sends SIGTERM to the proxy process. Prints a message if no proxy is running.thv llm proxy statusChecks the PID file to determine whether the proxy is running, then prints:
Acceptance Criteria
thv llm proxy stopstops a background proxy without modifying any tool configurationthv llm proxy stopexits cleanly (exit 0) if no proxy is runningthv llm proxy statusprints proxy running state, PID, listen address--helpoutputReferences
pkg/llm/setup.go—StopProxyBackground,PidFilePath(already implemented, just not exposed)cmd/thv/app/llm.go—newLLMCmd,proxyCmd(add subcommands here)