{"record":{"id":"12403fb0dcf86d1a","repo":"JuliusBrussee/caveman","slug":"cachebench-unsupported-trace-provider-q","errorCode":null,"errorMessage":"cachebench: unsupported trace provider %q","messagePattern":"cachebench: unsupported trace provider %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/trace.go","lineNumber":167,"sourceCode":"\t\t\tmessages = append(messages, bedrockMessage(message))\n\t\t}\n\t\tbody = map[string]any{\n\t\t\t\"system\":     []any{map[string]any{\"text\": systemText}},\n\t\t\t\"toolConfig\": map[string]any{\"tools\": []any{map[string]any{\"toolSpec\": map[string]any{\"name\": \"workspace\", \"description\": toolsText, \"inputSchema\": map[string]any{\"json\": map[string]any{\"type\": \"object\"}}}}}},\n\t\t\t\"messages\":   messages, \"inferenceConfig\": map[string]any{\"maxTokens\": 256},\n\t\t}\n\tcase \"gemini\":\n\t\tcontents := make([]any, 0, len(history))\n\t\tfor _, message := range history {\n\t\t\tcontents = append(contents, geminiMessage(message))\n\t\t}\n\t\tbody = map[string]any{\n\t\t\t\"systemInstruction\": map[string]any{\"parts\": []any{map[string]any{\"text\": systemText}}},\n\t\t\t\"tools\":             []any{map[string]any{\"functionDeclarations\": []any{map[string]any{\"name\": \"workspace\", \"description\": toolsText, \"parameters\": map[string]any{\"type\": \"object\"}}}}},\n\t\t\t\"contents\":          contents, \"generationConfig\": map[string]any{\"maxOutputTokens\": 256},\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"cachebench: unsupported trace provider %q\", provider.Provider)\n\t}\n\treturn json.Marshal(body)\n}\n\nfunc anthropicMessage(message agentMessage) map[string]any {\n\tswitch message.Kind {\n\tcase \"assistant_tool\":\n\t\treturn map[string]any{\"role\": \"assistant\", \"content\": []any{map[string]any{\n\t\t\t\"type\": \"tool_use\", \"id\": fmt.Sprintf(\"call-%03d\", message.Turn), \"name\": \"workspace\", \"input\": map[string]any{},\n\t\t}}}\n\tcase \"tool_result\":\n\t\treturn map[string]any{\"role\": \"user\", \"content\": []any{map[string]any{\n\t\t\t\"type\": \"tool_result\", \"tool_use_id\": fmt.Sprintf(\"call-%03d\", message.Turn), \"content\": message.Text,\n\t\t}}}\n\tdefault:\n\t\treturn map[string]any{\"role\": \"user\", \"content\": message.Text}\n\t}\n}","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/trace.go#L149-L185","documentation":"providerBody was asked to serialise a synthetic trace for a provider outside the supported set (openai/anthropic/bedrock/gemini); the offending provider string is quoted. This is the trace-generator counterpart of corpusProviderBody.","triggerScenarios":"Thrown at cacheengine/cachebench/trace.go:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the provider name in the generator configuration","Add a case in providerBody for the new provider"],"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"}