JuliusBrussee/caveman · error
cachebench: invalid replay model
Error message
cachebench: invalid replay model
What it means
Error "cachebench: invalid replay model" thrown in JuliusBrussee/caveman.
Source
Thrown at cacheengine/cachebench/replay_http.go:167
return ReplayResponse{}, errors.New("cachebench: provider request failed")
}
defer response.Body.Close()
body, err := io.ReadAll(io.LimitReader(response.Body, transport.maxResponseBytes+1))
if err != nil {
return ReplayResponse{StatusCode: response.StatusCode}, errors.New("cachebench: provider response read failed")
}
if int64(len(body)) > transport.maxResponseBytes {
return ReplayResponse{StatusCode: response.StatusCode}, errors.New("cachebench: provider response exceeds configured limit")
}
return ReplayResponse{
StatusCode: response.StatusCode, Body: body,
ProviderRequestID: providerRequestID(response.Header),
}, nil
}
func (transport *HTTPReplayTransport) endpoint(provider string, outbound ReplayOutbound) (*url.URL, error) {
if !validBoundedText(outbound.Model, 512, false) {
return nil, errors.New("cachebench: invalid replay model")
}
base := transport.baseURLs[provider]
if provider == "bedrock" && base == nil {
if !validAWSRegion(outbound.Region) {
return nil, errors.New("cachebench: invalid Bedrock region")
}
parsed, _ := url.Parse("https://bedrock-runtime." + outbound.Region + ".amazonaws.com")
base = parsed
}
if base == nil {
return nil, fmt.Errorf("cachebench: unsupported replay provider %q", provider)
}
var path, rawPath string
switch provider {
case "openai":
if outbound.Endpoint != "/v1/chat/completions" && outbound.Endpoint != "/v1/responses" {
return nil, errors.New("cachebench: unsupported OpenAI replay endpoint")
}View on GitHub (pinned to 27d5a3981a)
Solutions
- Use a valid model for the replay provider.
When it happens
Trigger: Thrown at cacheengine/cachebench/replay_http.go:167 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/9633a59d637af52d.
Report an issue: GitHub.