Skip to content

Publish thv llm commands and regenerate CLI reference docs#5189

Merged
yrobla merged 1 commit intomainfrom
feat/enable-llm
May 5, 2026
Merged

Publish thv llm commands and regenerate CLI reference docs#5189
yrobla merged 1 commit intomainfrom
feat/enable-llm

Conversation

@yrobla
Copy link
Copy Markdown
Contributor

@yrobla yrobla commented May 5, 2026

Summary

Remove Hidden: true from the thv llm command group and thv llm token subcommand, making them visible in help output and CLI reference. Update the command description to reflect that both proxy and token-helper modes are now supported (not planned). Regenerate docs/cli/ to include the full thv llm subcommand tree.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

  • Unit tests (task test)
  • E2E tests (task test-e2e)
  • Linting (task lint-fix)
  • Manual testing (describe below)

API Compatibility

  • This PR does not break the v1beta1 API, OR the api-break-allowed label is applied and the migration guidance is described above.

Changes

File Change

Does this introduce a user-facing change?

Implementation plan

Approved implementation plan

Special notes for reviewers

@yrobla yrobla requested a review from Copilot May 5, 2026 09:45
@github-actions github-actions Bot added the size/M Medium PR: 300-599 lines changed label May 5, 2026
JAORMX
JAORMX previously approved these changes May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the thv llm command group part of the public CLI surface and regenerates the CLI reference so the LLM gateway workflow is documented alongside the rest of ToolHive. It also updates the top-level llm description to say proxy and token-helper modes are supported rather than planned.

Changes:

  • Unhide thv llm and thv llm token in the Cobra command tree.
  • Update the thv llm long description to describe supported proxy/token-helper modes.
  • Regenerate docs/cli/ so the full thv llm command tree appears in CLI reference docs.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cmd/thv/app/llm.go Makes llm and llm token visible and updates the top-level help text.
docs/cli/thv.md Adds thv llm to the root CLI reference index.
docs/cli/thv_llm.md New top-level thv llm reference page.
docs/cli/thv_llm_token.md New reference page for thv llm token.
docs/cli/thv_llm_teardown.md New reference page for thv llm teardown.
docs/cli/thv_llm_setup.md New reference page for thv llm setup.
docs/cli/thv_llm_proxy.md New reference page for the thv llm proxy group.
docs/cli/thv_llm_proxy_start.md New reference page for thv llm proxy start.
docs/cli/thv_llm_config.md New reference page for the thv llm config group.
docs/cli/thv_llm_config_show.md New reference page for thv llm config show.
docs/cli/thv_llm_config_set.md New reference page for thv llm config set.
docs/cli/thv_llm_config_reset.md New reference page for thv llm config reset.
Comments suppressed due to low confidence (1)

cmd/thv/app/llm.go:38

  • runLLMToken returns an OAuth/OIDC access token, not necessarily a JWT. Some providers issue opaque bearer tokens, so documenting this as a "fresh JWT" is inaccurate and may lead users to build integrations that incorrectly depend on JWT structure.
authentication transparently. Two modes are supported:

  Proxy mode    — a localhost reverse proxy injects fresh tokens for tools
                  that only accept static API keys (e.g. Cursor).
  Token helper  — "thv llm token" prints a fresh JWT suitable for use as
                  apiKeyHelper or auth.command in OIDC-capable tools
                  (e.g. Claude Code).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/thv/app/llm.go
@yrobla yrobla force-pushed the feat/enable-llm branch from f1bc712 to 9432bc6 Compare May 5, 2026 09:50
@yrobla yrobla requested a review from jerm-dro as a code owner May 5, 2026 09:50
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels May 5, 2026
Remove Hidden: true from the thv llm command group and thv llm token
subcommand, making them visible in help output and CLI reference.
Update the command description to reflect that both proxy and
token-helper modes are now supported (not planned). Regenerate
docs/cli/ to include the full thv llm subcommand tree.
@yrobla yrobla force-pushed the feat/enable-llm branch from 9432bc6 to ae0098a Compare May 5, 2026 09:53
@github-actions github-actions Bot added size/M Medium PR: 300-599 lines changed and removed size/M Medium PR: 300-599 lines changed labels May 5, 2026
@yrobla yrobla merged commit 1f138ee into main May 5, 2026
20 of 22 checks passed
@yrobla yrobla deleted the feat/enable-llm branch May 5, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR: 300-599 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants