JuliusBrussee/caveman · error
cache-replay: custom base URLs require…
Error message
cache-replay: custom base URLs require -allow-custom-base-url
What it means
A custom (non-default) provider base URL was supplied via -base-url without -allow-custom-base-url. The confirmation flag exists because custom HTTPS endpoints receive provider credentials, so sending them anywhere other than official endpoints must be explicit.
Solutions
- Add -allow-custom-base-url after verifying the custom endpoint is trusted to receive your credentials
- Drop the -base-url override to use the official provider endpoints
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cacheengine/cmd/cache-replay/main.go:225 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/a6e1d4ee65e1ae90.
Report an issue: GitHub.
Appendix: source
Thrown at cacheengine/cmd/cache-replay/main.go:225
verifierOutputBytes := flag.Int64("max-verifier-output-bytes", 16<<20, "maximum verifier JSON bytes/request")
targetRate := flag.Float64("target", .97, "required request and token cache-hit rate")
minEligible := flag.Int("min-requests", 100, "minimum eligible requests/provider")
allowInsecureLoopback := flag.Bool("allow-insecure-loopback", false, "allow HTTP only for explicit loopback test base URLs")
allowCustomBaseURL := flag.Bool("allow-custom-base-url", false, "confirm credentials may be sent to explicit custom HTTPS base URLs")
verifierTimeout := flag.Duration("verifier-timeout", 5*time.Minute, "hard timeout per task-verifier invocation")
flag.Var(&verifierArgs, "verifier-arg", "verifier argument; repeatable, no shell parsing")
flag.Var(&verifierEnv, "verifier-env", "environment variable exposed to verifier; repeatable")
flag.Var(&baseURLs, "base-url", "test/custom provider base URL as provider=https://host; repeatable")
flag.Parse()
if *tracePath == "" || !filepath.IsAbs(*tracePath) || *maxRequests <= 0 || *maxRequests > maxReplayRequests || *maxTokens <= 0 || *maxTraceBytes <= 0 || *maxTraceBytes > maxReplayTraceBytes || *maxResponseBytes <= 0 || *maxResponseBytes > 256<<20 || *providerTimeout < time.Second || *providerTimeout > time.Hour || *verifierOutputBytes <= 0 || *verifierOutputBytes > 256<<20 || *verifierTimeout <= 0 || *maxScheduleDrift <= 0 || *maxConcurrency <= 0 || *maxConcurrency > 1024 {
fatalConfig(errors.New("cache-replay: -trace and positive request/token/trace/response/verifier limits required"))
}
if (*maxResponseBytes+*verifierOutputBytes)*int64(*maxConcurrency) > maxReplayInflightBytes {
fatalConfig(fmt.Errorf("cache-replay: concurrent response and verifier buffers exceed %d bytes", maxReplayInflightBytes))
}
if len(baseURLs) > 0 && !*allowCustomBaseURL {
fatalConfig(errors.New("cache-replay: custom base URLs require -allow-custom-base-url"))
}
records, traceSHA, err := readTrace(*tracePath, *maxTraceBytes, *maxRequests)
if err != nil {
fatalConfig(err)
}
limits := cachebench.ReplayLimits{
MaxRequests: *maxRequests, MaxDeclaredBilledTokens: *maxTokens, MaxGap: *maxGap, MaxScheduleDrift: *maxScheduleDrift,
MaxConcurrency: *maxConcurrency,
RequireGroundedTiming: !*allowUngrounded, RequireProviderTokens: !*allowEstimatedTokens,
}
preflight, err := cachebench.ValidateReplay(records, limits, *timeScale)
if err != nil {
fatalConfig(err)
}
target := cachebench.Target{RequestHitRate: *targetRate, TokenHitRate: *targetRate, MinEligibleRequest: *minEligible}
if err := cachebench.ValidateReplayTarget(records, target); err != nil {
fatalConfig(err)
}View on GitHub (pinned to 766dce6b13)