JuliusBrussee/caveman · error

cachebench: unsupported Anthropic replay endpoint

Error message

cachebench: unsupported Anthropic replay endpoint

What it means

Error "cachebench: unsupported Anthropic replay endpoint" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cachebench/replay_http.go:189

		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")
		}
		path = outbound.Endpoint
	case "anthropic":
		if outbound.Endpoint != "/v1/messages" {
			return nil, errors.New("cachebench: unsupported Anthropic replay endpoint")
		}
		path = outbound.Endpoint
	case "gemini":
		if outbound.Endpoint != "generateContent" {
			return nil, errors.New("cachebench: unsupported Gemini replay endpoint")
		}
		rawPath = "/v1beta/models/" + url.PathEscape(outbound.Model) + ":generateContent"
	case "bedrock":
		if outbound.Endpoint != "converse" || !validAWSRegion(outbound.Region) {
			return nil, errors.New("cachebench: unsupported Bedrock replay endpoint or region")
		}
		rawPath = "/model/" + url.PathEscape(outbound.Model) + "/converse"
	default:
		return nil, fmt.Errorf("cachebench: unsupported replay provider %q", provider)
	}
	resolved := *base
	if rawPath == "" {
		resolved.Path = strings.TrimRight(base.Path, "/") + path

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Use the supported Anthropic replay endpoint.

When it happens

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