{"record":{"id":"35d81909dbc99a0c","repo":"sipeed/picoclaw","slug":"invalid-eval-mode-q-must-be-token-or-llm","errorCode":null,"errorMessage":"invalid --eval-mode %q: must be token or llm","messagePattern":"invalid --eval-mode %q: must be token or llm","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/membench/main.go","lineNumber":201,"sourceCode":"\n\tif flagLimit > 0 {\n\t\tfor i := range samples {\n\t\t\tif len(samples[i].QA) > flagLimit {\n\t\t\t\tsamples[i].QA = samples[i].QA[:flagLimit]\n\t\t\t}\n\t\t}\n\t\tlog.Printf(\"Limited to %d QA per sample\", flagLimit)\n\t}\n\n\tevalMode := strings.ToLower(strings.TrimSpace(flagEvalMode))\n\tvar useLLM bool\n\tswitch evalMode {\n\tcase \"token\":\n\t\tuseLLM = false\n\tcase \"llm\":\n\t\tuseLLM = true\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid --eval-mode %q: must be token or llm\", flagEvalMode)\n\t}\n\tvar answerClient, judgeClient *LLMClient\n\tif useLLM {\n\t\topts, err := buildLLMOptions()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tanswerClient = NewLLMClient(opts)\n\t\tjudgeClient = answerClient // default: same client\n\t\tif flagJudgeModel != \"\" {\n\t\t\tjOpts := opts // copy base settings\n\t\t\tjOpts.Model = flagJudgeModel\n\t\t\tif flagJudgeAPIBase != \"\" {\n\t\t\t\tjOpts.BaseURL = flagJudgeAPIBase\n\t\t\t}\n\t\t\tif flagJudgeAPIKey != \"\" {\n\t\t\t\tjOpts.APIKey = flagJudgeAPIKey\n\t\t\t}","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/membench/main.go#L183-L219","documentation":"Error \"invalid --eval-mode %q: must be token or llm\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at cmd/membench/main.go:201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}