JuliusBrussee/caveman · error
duplicate provider
Error message
duplicate provider %q
What it means
Raised by baseURLValues.Set (the -base-url flag parser in cache-replay): the same provider name was passed more than times than allowed — the provider key already exists in the map when Set is called again. Provider must be unique because each maps to exactly one base URL.
Solutions
- Pass each provider only once, e.g. -base-url openai=https://a -base-url anthropic=https://b
- Remove the duplicate -base-url entry for the named provider from the command line or config script
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cacheengine/cmd/cache-replay/main.go:64 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/d1866c786730be42.
Report an issue: GitHub.
Appendix: source
Thrown at cacheengine/cmd/cache-replay/main.go:64
keys := make([]string, 0, len(*values))
for key := range *values {
keys = append(keys, key)
}
sort.Strings(keys)
return strings.Join(keys, ",")
}
func (values *baseURLValues) Set(value string) error {
provider, raw, ok := strings.Cut(value, "=")
provider = strings.ToLower(strings.TrimSpace(provider))
if !ok || provider == "" || strings.TrimSpace(raw) == "" {
return errors.New("want provider=https://host")
}
if *values == nil {
*values = map[string]string{}
}
if _, exists := (*values)[provider]; exists {
return fmt.Errorf("duplicate provider %q", provider)
}
(*values)[provider] = strings.TrimSpace(raw)
return nil
}
type runManifest struct {
Schema string `json:"schema"`
Status string `json:"status"`
Publishable bool `json:"publishable"`
TraceSHA256 string `json:"trace_sha256"`
StartedAt string `json:"started_at"`
CompletedAt string `json:"completed_at,omitempty"`
Preflight cachebench.ReplayPreflight `json:"preflight"`
Target cachebench.Target `json:"target"`
Completed int `json:"completed_requests"`
FailedRequest string `json:"failed_request,omitempty"`
FailureCode string `json:"failure_code,omitempty"`
EvidenceBasis string `json:"evidence_basis"`View on GitHub (pinned to 766dce6b13)