diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index f7ef736..6e63b6a 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -83,7 +83,7 @@ func validateGenerationFlags(ctx *lmcli.Context, cmd *cobra.Command) error { if err != nil { return fmt.Errorf("Error parsing --agent: %w", err) } - if agent != "" && !slices.Contains(ctx.GetAgents(), agent) { + if agent != "" && agent != "none" && !slices.Contains(ctx.GetAgents(), agent) { return fmt.Errorf("Unknown agent: %s", agent) } return nil diff --git a/pkg/lmcli/lmcli.go b/pkg/lmcli/lmcli.go index e5f6e8c..2235376 100644 --- a/pkg/lmcli/lmcli.go +++ b/pkg/lmcli/lmcli.go @@ -86,7 +86,7 @@ func (c *Context) GetAgents() (agents []string) { } func (c *Context) GetAgent(name string) *Agent { - if name == "" { + if name == "" || name == "none" { return nil }