Skip to content

thv llm: package skeleton, cobra commands, and config management #5027

@yrobla

Description

@yrobla

Context

Part of #5016 (RFC: stacklok/toolhive-rfcs#70). This is the foundation subtask — all other subtasks depend on this.

Scope

  • pkg/llm/config.go — config types (LLMConfig, gateway URL, OIDC settings, proxy port)
  • pkg/llm/internal/ — package structure scaffolding
  • Wire thv llm cobra command group into root command with subcommand stubs
  • thv llm config set — persist gateway URL, OIDC settings, proxy port to config.yaml under llm: key
  • thv llm config show — display current LLM config; --output json produces valid JSON
  • thv llm config reset — clear all LLM config and delete cached tokens from secrets provider

Acceptance Criteria

  • thv llm config set --gateway-url <url> --issuer <issuer> --client-id <id> persists settings to config.yaml under llm:
  • thv llm config show displays current config; --output json produces valid JSON
  • thv llm config reset clears LLM config and removes cached tokens from the secrets provider
  • thv llm subcommand group is reachable from the root command; all subcommands are stubbed and return a not-implemented error until filled in by subsequent subtasks

Dependencies

None — this is the first subtask.

References

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions