Skip to content

thv llm proxy: missing stop and status subcommands #5126

@yrobla

Description

@yrobla

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

  • thv llm proxy stop stops a background proxy without modifying any tool configuration
  • thv llm proxy stop exits cleanly (exit 0) if no proxy is running
  • thv llm proxy status prints proxy running state, PID, listen address
  • Both commands are documented in --help output

References

  • pkg/llm/setup.goStopProxyBackground, PidFilePath (already implemented, just not exposed)
  • cmd/thv/app/llm.gonewLLMCmd, proxyCmd (add subcommands here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliChanges that impact CLI functionalityenhancementNew feature or requestgoPull requests that update go codellm gatewayLLM gateway authentication feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions