{"record":{"id":"b8c51f5c96bfc7d5","repo":"sipeed/picoclaw","slug":"model-is-required","errorCode":null,"errorMessage":"model is required","messagePattern":"model is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config.go","lineNumber":844,"sourceCode":"func (c *ModelConfig) APIKey() string {\n\tif len(c.APIKeys) > 0 {\n\t\treturn c.APIKeys[0].String()\n\t}\n\treturn \"\"\n}\n\n// IsVirtual returns true if this model was generated from multi-key expansion.\nfunc (c *ModelConfig) IsVirtual() bool {\n\treturn c.isVirtual\n}\n\n// Validate checks if the ModelConfig has all required fields.\nfunc (c *ModelConfig) Validate() error {\n\tif c.ModelName == \"\" {\n\t\treturn fmt.Errorf(\"model_name is required\")\n\t}\n\tif c.Model == \"\" {\n\t\treturn fmt.Errorf(\"model is required\")\n\t}\n\tif _, err := providercommon.NormalizeToolSchemaTransform(c.ToolSchemaTransform); err != nil {\n\t\treturn err\n\t}\n\n\t// Reject whitespace in model identifier\n\tif strings.ContainsAny(c.Model, \" \\t\\n\\r\") {\n\t\treturn fmt.Errorf(\"model identifier contains whitespace\")\n\t}\n\n\t// Reject leading slash\n\tif strings.HasPrefix(c.Model, \"/\") {\n\t\treturn fmt.Errorf(\"model identifier must not start with /\")\n\t}\n\n\t// Reject consecutive slashes\n\tif strings.Contains(c.Model, \"//\") {\n\t\treturn fmt.Errorf(\"model identifier must not contain //\")","sourceCodeStart":826,"sourceCodeEnd":862,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config.go#L826-L862","documentation":"Error \"model is required\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/config/config.go:844 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-16T03:17:38.424Z"}