JuliusBrussee/caveman · error
provider %q upstream URL must not include userinfo
Error message
provider %q upstream URL must not include userinfo
What it means
parseBaseURL rejects upstream URLs embedding credentials (user:pass@host). Credentials in the URL are a security hazard and the proxy authenticates via configured API keys instead.
Source
Thrown at proxy/providers/openaicompat/openaicompat.go:351
return nil
}
func parseBaseURL(raw, provider string) (*url.URL, error) {
if strings.TrimSpace(raw) == "" {
return nil, fmt.Errorf("provider %q has no configured upstream URL", provider)
}
u, err := url.Parse(strings.TrimSpace(raw))
if err != nil {
return nil, err
}
if u.Scheme != "http" && u.Scheme != "https" {
return nil, fmt.Errorf("provider %q upstream URL scheme %q is not allowed", provider, u.Scheme)
}
if !u.IsAbs() || u.Host == "" || u.Hostname() == "" {
return nil, fmt.Errorf("provider %q upstream URL must be an absolute URL with a host", provider)
}
if u.User != nil {
return nil, fmt.Errorf("provider %q upstream URL must not include userinfo", provider)
}
if u.Fragment != "" {
return nil, fmt.Errorf("provider %q upstream URL must not include a fragment", provider)
}
if err := validatePathComponents(u.Path, u.RawPath); err != nil {
return nil, fmt.Errorf("provider %q upstream URL path rejected: %w", provider, err)
}
return u, nil
}
View on GitHub (pinned to 5184b3d11a)
Solutions
- Move credentials out of the URL into the gateway's credential configuration/headers
- Regenerate any credentials that were embedded in the URL
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at proxy/providers/openaicompat/openaicompat.go:308 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@5184b3d11a (2026-08-18).
Data as JSON: /api/errors/b90a1c55041d511d.
Report an issue: GitHub.