JuliusBrussee/caveman · error

cachebench: replay response limit must be between 1 byte and

Error message

cachebench: replay response limit must be between 1 byte and 256 MiB

What it means

Error "cachebench: replay response limit must be between 1 byte and 256 MiB" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cachebench/replay_http.go:64

	maxRequestBytes  int64
	maxResponseBytes int64
}

// NewHTTPReplayTransport validates endpoints, limits, TLS, and redirect policy.
func NewHTTPReplayTransport(config HTTPReplayConfig) (*HTTPReplayTransport, error) {
	requestLimit := config.MaxRequestBytes
	if requestLimit == 0 {
		requestLimit = 64 << 20
	}
	if requestLimit < 1 || requestLimit > 256<<20 {
		return nil, errors.New("cachebench: replay request limit must be between 1 byte and 256 MiB")
	}
	limit := config.MaxResponseBytes
	if limit == 0 {
		limit = defaultReplayResponseLimit
	}
	if limit < 1 || limit > 256<<20 {
		return nil, errors.New("cachebench: replay response limit must be between 1 byte and 256 MiB")
	}
	requestTimeout := config.RequestTimeout
	if requestTimeout == 0 {
		requestTimeout = 2 * time.Minute
	}
	if requestTimeout < time.Second || requestTimeout > time.Hour {
		return nil, errors.New("cachebench: replay request timeout must be between 1 second and 1 hour")
	}
	bases := map[string]string{
		"openai":    "https://api.openai.com",
		"anthropic": "https://api.anthropic.com",
		"gemini":    "https://generativelanguage.googleapis.com",
	}
	for provider, value := range config.BaseURLs {
		provider = strings.ToLower(strings.TrimSpace(provider))
		if provider != "openai" && provider != "anthropic" && provider != "gemini" && provider != "bedrock" {
			return nil, fmt.Errorf("cachebench: unsupported replay base URL provider %q", provider)
		}

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Set the replay response limit between 1 byte and 256 MiB.

When it happens

Trigger: Thrown at cacheengine/cachebench/replay_http.go:64 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/a18843921142ca65. Report an issue: GitHub.