Problem
thv llm config set --gateway-url correctly validates that the URL uses the https scheme:
if u.Scheme != "https" {
return fmt.Errorf("gateway URL must use HTTPS: %s", llmConfigGatewayURL)
}
However, thv llm setup --gateway-url calls applySetupFlags, which writes the URL directly to config without any scheme validation. This means a user can accidentally configure an http:// gateway via setup, then hit a confusing error later at proxy creation time (inside llm.NewProxy).
Expected behavior
applySetupFlags (or newLLMSetupCmd's RunE) should apply the same HTTPS validation as llmConfigSetFunc when --gateway-url is changed.
Acceptance Criteria
References
cmd/thv/app/llm.go — llmConfigSetFunc (has validation) vs applySetupFlags (no validation)
Problem
thv llm config set --gateway-urlcorrectly validates that the URL uses thehttpsscheme:However,
thv llm setup --gateway-urlcallsapplySetupFlags, which writes the URL directly to config without any scheme validation. This means a user can accidentally configure anhttp://gateway viasetup, then hit a confusing error later at proxy creation time (insidellm.NewProxy).Expected behavior
applySetupFlags(ornewLLMSetupCmd'sRunE) should apply the same HTTPS validation asllmConfigSetFuncwhen--gateway-urlis changed.Acceptance Criteria
thv llm setup --gateway-url http://...returns an error: "gateway URL must use HTTPS"thv llm config setandthv llm setupReferences
cmd/thv/app/llm.go—llmConfigSetFunc(has validation) vsapplySetupFlags(no validation)