Skip to content

Commit 5d236e4

Browse files
authored
fix: accept openai as valid secret type in secrets create (#59)
1 parent eac5b4f commit 5d236e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/onecli/secrets.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (c *SecretsListCmd) Run(out *output.Writer) error {
5151
type SecretsCreateCmd struct {
5252
Project string `optional:"" short:"p" help:"Project slug."`
5353
Name string `required:"" help:"Display name for the secret."`
54-
Type string `required:"" help:"Secret type: 'anthropic' or 'generic'."`
54+
Type string `required:"" help:"Secret type: 'anthropic', 'openai', or 'generic'."`
5555
Value string `required:"" help:"Secret value (e.g. API key)."`
5656
HostPattern string `required:"" name:"host-pattern" help:"Host pattern to match (e.g. 'api.anthropic.com')."`
5757
PathPattern string `optional:"" name:"path-pattern" help:"Path pattern to match (e.g. '/v1/*')."`
@@ -93,8 +93,8 @@ func (c *SecretsCreateCmd) Run(out *output.Writer) error {
9393
}
9494
}
9595

96-
if input.Type != "anthropic" && input.Type != "generic" {
97-
return fmt.Errorf("invalid type %q: must be 'anthropic' or 'generic'", input.Type)
96+
if input.Type != "anthropic" && input.Type != "openai" && input.Type != "generic" {
97+
return fmt.Errorf("invalid type %q: must be 'anthropic', 'openai', or 'generic'", input.Type)
9898
}
9999

100100
if c.DryRun {

0 commit comments

Comments
 (0)