JuliusBrussee/caveman · error
vertex base url invalid: %w
Error message
vertex base url invalid: %w
What it means
url.Parse rejected the configured Vertex base URL (route override or a.BaseURL), so no upstream endpoint could be constructed. This is a configuration error: the URL string itself is syntactically invalid, distinct from later SSRF/host validation of a parseable URL.
Source
Thrown at proxy/providers/vertex/routing.go:53
return nil, fmt.Errorf("vertex request path %q does not name a publisher, model, and method", req.URL.Path)
}
if !methodAllowed(publisher, method) {
return nil, fmt.Errorf("vertex method %q is not allowed for publisher %q", method, publisher)
}
if !publisherAllowed(publisher) {
return nil, fmt.Errorf("vertex publisher %q is not on the allowlist", publisher)
}
if !modelAllowed(model) {
return nil, fmt.Errorf("vertex model %q is not on the allowlist", model)
}
baseURL := a.BaseURL
if route.BaseURL != "" {
baseURL = route.BaseURL
}
base, err := url.Parse(baseURL)
if err != nil {
return nil, fmt.Errorf("vertex base url invalid: %w", err)
}
base.Path = strings.TrimRight(base.Path, "/") + strings.TrimPrefix(req.URL.Path, "/vertex")
base.RawQuery = req.URL.RawQuery
// SSRF/host validation on the resolved endpoint. Active in managed (prod)
// mode; local/self-hosted (stub) endpoints are permitted so the dry-run and
// examples can target the provider-stub.
if env.IsProduction() {
if err := ssrf.ValidateURL(ctx, base.String(), ssrf.ManagedConfig()); err != nil {
return nil, err
}
if host := base.Hostname(); !isVertexHost(host) {
return nil, fmt.Errorf("vertex endpoint host %q is not an aiplatform host", host)
}
}
return base, nil
}
View on GitHub (pinned to 766dce6b13)
Solutions
- Correct the syntax of the Vertex base URL in configuration or the route override
- Ensure the URL includes scheme and host, e.g. https://aiplatform.googleapis.com
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at proxy/providers/vertex/routing.go:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18).
Data as JSON: /api/errors/299a037953e825a6.
Report an issue: GitHub.