{"record":{"id":"401f09a5ad24e5e4","repo":"sipeed/picoclaw","slug":"model-or-membench-model-is-required-for-llm-eval","errorCode":null,"errorMessage":"--model or MEMBENCH_MODEL is required for LLM eval mode","messagePattern":"--model or MEMBENCH_MODEL is required for LLM eval mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/membench/main.go","lineNumber":343,"sourceCode":"\treturn os.Getenv(envKey)\n}\n\n// buildLLMOptions resolves LLM client configuration from flags and environment\n// variables. Flag values take precedence over environment variables.\n//\n// Environment variables:\n//\n//\tMEMBENCH_API_BASE  – OpenAI-compatible base URL  (default http://127.0.0.1:8080/v1)\n//\tMEMBENCH_API_KEY   – Bearer token for the endpoint\n//\tMEMBENCH_MODEL     – Model name to send in the request\nfunc buildLLMOptions() (LLMClientOptions, error) {\n\tbase := envOrFlag(flagAPIBase, \"MEMBENCH_API_BASE\")\n\tif base == \"\" {\n\t\tbase = \"http://127.0.0.1:8080/v1\"\n\t}\n\tmodel := envOrFlag(flagModel, \"MEMBENCH_MODEL\")\n\tif model == \"\" {\n\t\treturn LLMClientOptions{}, fmt.Errorf(\n\t\t\t\"--model or MEMBENCH_MODEL is required for LLM eval mode\",\n\t\t)\n\t}\n\tapiKey := envOrFlag(flagAPIKey, \"MEMBENCH_API_KEY\")\n\n\tif flagTimeout <= 0 {\n\t\treturn LLMClientOptions{}, fmt.Errorf(\"--timeout must be > 0, got %d\", flagTimeout)\n\t}\n\n\treturn LLMClientOptions{\n\t\tBaseURL:    base,\n\t\tModel:      model,\n\t\tAPIKey:     apiKey,\n\t\tNoThinking: flagNoThinking,\n\t\tTimeout:    time.Duration(flagTimeout) * time.Second,\n\t\tMaxRetries: flagRetries,\n\t}, nil\n}","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/membench/main.go#L325-L361","documentation":"Error \"--model or MEMBENCH_MODEL is required for LLM eval mode\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at cmd/membench/main.go:343 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"}