{"record":{"id":"1282271e2144bef6","repo":"JuliusBrussee/caveman","slug":"baseline-usage-w","errorCode":null,"errorMessage":"baseline usage: %w","messagePattern":"baseline usage: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/evals/quality.go","lineNumber":182,"sourceCode":"\tcompressedResp, err := opts.Runner.Complete(ctx, ModelRequest{\n\t\tFixtureName:    f.Name,\n\t\tVariant:        \"compressed\",\n\t\tModel:          opts.Model,\n\t\tContentType:    contentType,\n\t\tQuestion:       f.QualityTask.Question,\n\t\tExpectedAnswer: expected,\n\t\tSeed:           opts.Seed,\n\t\tTemperature:    opts.Temperature,\n\t\tPrompt:         compressedPrompt,\n\t})\n\tif err != nil {\n\t\treturn QualityReport{}, fmt.Errorf(\"compressed model call: %w\", err)\n\t}\n\n\tcounter := tokens.Default()\n\treport.BaselineUsage, err = fillUsage(counter, baselinePrompt, baseline, opts.RequireUsage)\n\tif err != nil {\n\t\treturn QualityReport{}, fmt.Errorf(\"baseline usage: %w\", err)\n\t}\n\treport.CompressedUsage, err = fillUsage(counter, compressedPrompt, compressedResp, opts.RequireUsage)\n\tif err != nil {\n\t\treturn QualityReport{}, fmt.Errorf(\"compressed usage: %w\", err)\n\t}\n\n\tbaseSubject := Subject{Input: input, Output: baseline.Output, ContentType: contentType, PassedThrough: true}\n\tcompSubject := Subject{Input: input, Output: compressedResp.Output, Ratio: compressionRatio, ContentType: contentType, PassedThrough: passedThrough}\n\tgrader := opts.Grader\n\tif grader == nil {\n\t\tgrader = LocalGrader{}\n\t}\n\treport.BaselineFailures, err = gradeFailures(ctx, grader, graders, baseSubject)\n\tif err != nil {\n\t\treturn QualityReport{}, fmt.Errorf(\"baseline grading: %w\", err)\n\t}\n\treport.CompressedFailures, err = gradeFailures(ctx, grader, graders, compSubject)\n\tif err != nil {","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/evals/quality.go#L164-L200","documentation":"Wraps fillUsage's failure for the baseline prompt/response in runQuality: token usage could not be established — the runner returned no usage and RequireUsage forbids local estimation, or counting failed. Usage accounting is mandatory, so quality comparison aborts.","triggerScenarios":"Thrown at engine/evals/quality.go:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the runner to return input/output token usage","Relax RequireUsage if local token estimation is acceptable for the run","Check the wrapped counting error for malformed response content"],"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"}