diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go index 1984ac9..be20f85 100644 --- a/cmd/serve/serve.go +++ b/cmd/serve/serve.go @@ -149,7 +149,7 @@ var ServeCmd = &cobra.Command{ } } - if aiProvider.Name == "" { + if aiProvider == nil || aiProvider.Name == "" { color.Red("Error: AI provider %s not specified in configuration. Please run k8sgpt auth", backend) os.Exit(1) }