{"record":{"id":"215597ebe61dc3e6","repo":"sipeed/picoclaw","slug":"error-creating-provider-w","errorCode":null,"errorMessage":"error creating provider: %w","messagePattern":"error creating provider: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/picoclaw/internal/agent/helpers.go","lineNumber":44,"sourceCode":"\tcfg, err := internal.LoadConfig()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error loading config: %w\", err)\n\t}\n\n\tlogger.ConfigureFromEnv()\n\n\tif debug {\n\t\tlogger.SetLevel(logger.DEBUG)\n\t\tfmt.Println(\"🔍 Debug mode enabled\")\n\t}\n\n\tif model != \"\" {\n\t\tcfg.Agents.Defaults.ModelName = model\n\t}\n\n\tprovider, modelID, err := providers.CreateProvider(cfg)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error creating provider: %w\", err)\n\t}\n\n\t// Use the resolved model ID from provider creation\n\tif modelID != \"\" {\n\t\tcfg.Agents.Defaults.ModelName = modelID\n\t}\n\n\tmsgBus := bus.NewMessageBus()\n\tdefer msgBus.Close()\n\tagentLoop := agent.NewAgentLoop(cfg, msgBus, provider)\n\tdefer agentLoop.Close()\n\n\t// Print agent startup info (only for interactive mode)\n\tstartupInfo := agentLoop.GetStartupInfo()\n\ttoolsInfo, ok := startupInfo[\"tools\"].(map[string]any)\n\tif !ok {\n\t\ttoolsInfo = nil\n\t}","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/picoclaw/internal/agent/helpers.go#L26-L62","documentation":"Error \"error creating provider: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at cmd/picoclaw/internal/agent/helpers.go:44 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"}