Skip to content

Commit 01f9a86

Browse files
committed
fix: correct ANTHROPIC_BASE_URL for Claude Code
Claude Code appends /v1/messages internally, so base URL must not include /v1. Changed from router.hpp.io/v1 to router.hpp.io.
1 parent 638cd11 commit 01f9a86

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cmd/hpphub/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ func launchClaude(model string, hubURL string) error {
300300
fmt.Printf(" ✓ Model: %s\n", model)
301301

302302
// Step 4: Derive Anthropic base URL
303-
anthropicBaseURL := strings.Replace(cfg.BaseURL, "/llm/v1", "/v1", 1)
303+
// Claude Code appends /v1/messages itself, so base URL should not include /v1
304+
// e.g., "https://router.hpp.io/llm/v1" → "https://router.hpp.io"
305+
anthropicBaseURL := strings.Replace(cfg.BaseURL, "/llm/v1", "", 1)
304306

305307
// Step 5: Launch Claude Code with HPP environment
306308
fmt.Println()

0 commit comments

Comments
 (0)