{"record":{"id":"bc97260ae3727a8c","repo":"JuliusBrussee/caveman","slug":"cachebench-unsupported-replay-base-url-provider","errorCode":null,"errorMessage":"cachebench: unsupported replay base URL provider %q","messagePattern":"cachebench: unsupported replay base URL provider %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay_http.go","lineNumber":81,"sourceCode":"\tif limit < 1 || limit > 256<<20 {\n\t\treturn nil, errors.New(\"cachebench: replay response limit must be between 1 byte and 256 MiB\")\n\t}\n\trequestTimeout := config.RequestTimeout\n\tif requestTimeout == 0 {\n\t\trequestTimeout = 2 * time.Minute\n\t}\n\tif requestTimeout < time.Second || requestTimeout > time.Hour {\n\t\treturn nil, errors.New(\"cachebench: replay request timeout must be between 1 second and 1 hour\")\n\t}\n\tbases := map[string]string{\n\t\t\"openai\":    \"https://api.openai.com\",\n\t\t\"anthropic\": \"https://api.anthropic.com\",\n\t\t\"gemini\":    \"https://generativelanguage.googleapis.com\",\n\t}\n\tfor provider, value := range config.BaseURLs {\n\t\tprovider = strings.ToLower(strings.TrimSpace(provider))\n\t\tif provider != \"openai\" && provider != \"anthropic\" && provider != \"gemini\" && provider != \"bedrock\" {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: unsupported replay base URL provider %q\", provider)\n\t\t}\n\t\tbases[provider] = value\n\t}\n\tparsed := make(map[string]*url.URL, len(bases))\n\tfor provider, value := range bases {\n\t\tbase, err := validateReplayBaseURL(value, config.AllowInsecureLoopback)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: %s replay base URL: %w\", provider, err)\n\t\t}\n\t\tparsed[provider] = base\n\t}\n\tclient := config.Client\n\tif client == nil {\n\t\tclient = &http.Client{\n\t\t\tTimeout: requestTimeout,\n\t\t\tTransport: &http.Transport{\n\t\t\t\tProxy:                 nil,\n\t\t\t\tDialContext:           (&net.Dialer{Timeout: 10 * time.Second, KeepAlive: 30 * time.Second}).DialContext,","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay_http.go#L63-L99","documentation":"NewHTTPReplayTransport was configured with a BaseURLs entry for a provider outside the supported set (openai/anthropic/gemini/bedrock). The provider name is normalised (trimmed, lowercased) before the check, so the offending key is the raw config value.","triggerScenarios":"Thrown at cacheengine/cachebench/replay_http.go:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or correct the unsupported provider key in ReplayHTTPConfig.BaseURLs","Add support for the provider in the transport if genuinely needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}