diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36d2860..d38675b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/openai-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: @@ -54,7 +54,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/openai-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 @@ -109,7 +109,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/openai-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3e9af1b..fbd9082 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.4.0" + ".": "1.5.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 013a733..ef31fde 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 258 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-ae4c1a92306e31f05678c3de72efbf1903b5c09924dacd42a555cc5ccc0e5eb1.yml -openapi_spec_hash: 0973932f9a3f0b46a0933b143878f9fe -config_hash: b40012963b4619be8229fcca0105b627 +configured_endpoints: 265 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-0650ebae454b4200491980d7663cb7ceabcff90dcb3ed9f67c3bca3e861a2bf6.yml +openapi_spec_hash: e9576bced964246b7e685a5ad30afffa +config_hash: 43e311595bcc4fb6b32eba0684de48d8 diff --git a/CHANGELOG.md b/CHANGELOG.md index fcdebd1..35271af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 1.5.0 (2026-07-24) + +Full Changelog: [v1.4.0...v1.5.0](https://github.com/openai/openai-cli/compare/v1.4.0...v1.5.0) + +### Features + +* **api:** /organization/projects/{project_id}/service_accounts/{service_account_id}/api_keys" endpoint ([ad0f9fa](https://github.com/openai/openai-cli/commit/ad0f9fa6c506df6341cb3e7a7170cde6a6744fef)) +* **api:** accept `None` for prompt_cache_key/safety_identifier ([ef9b250](https://github.com/openai/openai-cli/commit/ef9b250fcb6b054bba894e4df2d42a00ba6fb03d)) +* **api:** add support for `spend_limit` admin apis ([5992345](https://github.com/openai/openai-cli/commit/5992345efb39143ef81b6d19c8f589765160f599)) +* **api:** manual updates ([3c1f4b8](https://github.com/openai/openai-cli/commit/3c1f4b878c9c9e612f70369816c2fcf98306a350)) +* **api:** manual updates ([cff8c9d](https://github.com/openai/openai-cli/commit/cff8c9d86782342fbef787152ac4cfa32fdd70f7)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([8c73e8c](https://github.com/openai/openai-cli/commit/8c73e8c92716a1cdb9a374f1325626828a5b9577)) + + +### Chores + +* **internal:** codegen related update ([6a272cd](https://github.com/openai/openai-cli/commit/6a272cd43849f14518f43fc62b5aec0658830124)) +* **internal:** codegen related update ([5a04ac8](https://github.com/openai/openai-cli/commit/5a04ac8f304f05ea7fee9046fc10969fbc10756b)) + ## 1.4.0 (2026-07-14) Full Changelog: [v1.3.0...v1.4.0](https://github.com/openai/openai-cli/compare/v1.3.0...v1.4.0) diff --git a/go.mod b/go.mod index 6b8e61d..0971433 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openai/openai-cli -go 1.25 +go 1.25.0 require ( github.com/charmbracelet/bubbles v0.21.0 @@ -10,13 +10,13 @@ require ( github.com/goccy/go-yaml v1.18.0 github.com/itchyny/json2yaml v0.1.4 github.com/muesli/reflow v0.3.0 - github.com/openai/openai-go/v3 v3.42.0 + github.com/openai/openai-go/v3 v3.46.0 github.com/stretchr/testify v1.10.0 - github.com/tidwall/gjson v1.18.0 + github.com/tidwall/gjson v1.19.0 github.com/tidwall/pretty v1.2.1 github.com/urfave/cli-docs/v3 v3.0.0-alpha6 github.com/urfave/cli/v3 v3.3.2 - golang.org/x/sys v0.38.0 + golang.org/x/sys v0.47.0 ) require ( @@ -40,7 +40,7 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - golang.org/x/sync v0.15.0 // indirect - golang.org/x/text v0.21.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/text v0.40.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 63a425e..a97da95 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= -github.com/openai/openai-go/v3 v3.42.0 h1:16Skv1hpEhSm3imZpPGSeEBDUgVJJA9cHryKGGsVYI8= -github.com/openai/openai-go/v3 v3.42.0/go.mod h1:cdufnVK14cWcT9qA1rRtrXx4FTRsgbDPW7Ia7SS5cZo= +github.com/openai/openai-go/v3 v3.46.0 h1:9HzL4DOybwOHAAcsGpMQyELuw0e9OqynJOPV8SH8g5M= +github.com/openai/openai-go/v3 v3.46.0/go.mod h1:b8MgNMpR3lPifYnaOH8XwcG8qRHwhzZxuDgM9lL7h5k= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -58,8 +58,8 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= -github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.19.0 h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU= +github.com/tidwall/gjson v1.19.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -75,14 +75,14 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= -golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs= +golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/pkg/cmd/adminorganizationprojectserviceaccount.go b/pkg/cmd/adminorganizationprojectserviceaccount.go index 127ed9e..4dd8bd1 100644 --- a/pkg/cmd/adminorganizationprojectserviceaccount.go +++ b/pkg/cmd/adminorganizationprojectserviceaccount.go @@ -16,7 +16,7 @@ import ( var adminOrganizationProjectsServiceAccountsCreate = cli.Command{ Name: "create", - Usage: "Creates a new service account in the project. This also returns an unredacted\nAPI key for the service account.", + Usage: "Creates a new service account in the project. By default, this also returns an\nunredacted API key for the service account.", Suggest: true, Flags: []cli.Flag{ &requestflag.Flag[string]{ @@ -30,6 +30,11 @@ var adminOrganizationProjectsServiceAccountsCreate = cli.Command{ Required: true, BodyPath: "name", }, + &requestflag.Flag[*bool]{ + Name: "create-service-account-only", + Usage: "Create the service account without default roles or an API key.", + BodyPath: "create_service_account_only", + }, }, Action: handleAdminOrganizationProjectsServiceAccountsCreate, HideHelpCommand: true, diff --git a/pkg/cmd/adminorganizationprojectserviceaccount_test.go b/pkg/cmd/adminorganizationprojectserviceaccount_test.go index ce252b1..4ef6441 100644 --- a/pkg/cmd/adminorganizationprojectserviceaccount_test.go +++ b/pkg/cmd/adminorganizationprojectserviceaccount_test.go @@ -17,12 +17,15 @@ func TestAdminOrganizationProjectsServiceAccountsCreate(t *testing.T) { "admin:organization:projects:service-accounts", "create", "--project-id", "project_id", "--name", "name", + "--create-service-account-only=true", ) }) t.Run("piping data", func(t *testing.T) { // Test piping YAML data over stdin - pipeData := []byte("name: name") + pipeData := []byte("" + + "name: name\n" + + "create_service_account_only: true\n") mocktest.TestRunMockTestWithPipeAndFlags( t, pipeData, "--api-key", "string", diff --git a/pkg/cmd/adminorganizationprojectserviceaccountapikey.go b/pkg/cmd/adminorganizationprojectserviceaccountapikey.go new file mode 100644 index 0000000..372cb7b --- /dev/null +++ b/pkg/cmd/adminorganizationprojectserviceaccountapikey.go @@ -0,0 +1,101 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package cmd + +import ( + "context" + "fmt" + + "github.com/openai/openai-cli/internal/apiquery" + "github.com/openai/openai-cli/internal/requestflag" + "github.com/openai/openai-go/v3" + "github.com/openai/openai-go/v3/option" + "github.com/tidwall/gjson" + "github.com/urfave/cli/v3" +) + +var adminOrganizationProjectsServiceAccountsAPIKeysCreate = cli.Command{ + Name: "create", + Usage: "Creates an API key for a service account in the project.", + Suggest: true, + Flags: []cli.Flag{ + &requestflag.Flag[string]{ + Name: "project-id", + Usage: "The ID of the project.", + Required: true, + PathParam: "project_id", + }, + &requestflag.Flag[string]{ + Name: "service-account-id", + Usage: "The ID of the service account.", + Required: true, + PathParam: "service_account_id", + }, + &requestflag.Flag[string]{ + Name: "name", + Usage: "API key name.", + BodyPath: "name", + }, + &requestflag.Flag[[]string]{ + Name: "scope", + Usage: "API key scopes.", + BodyPath: "scopes", + }, + }, + Action: handleAdminOrganizationProjectsServiceAccountsAPIKeysCreate, + HideHelpCommand: true, +} + +func handleAdminOrganizationProjectsServiceAccountsAPIKeysCreate(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + if !cmd.IsSet("project-id") && len(unusedArgs) > 0 { + cmd.Set("project-id", unusedArgs[0]) + unusedArgs = unusedArgs[1:] + } + if !cmd.IsSet("service-account-id") && len(unusedArgs) > 0 { + cmd.Set("service-account-id", unusedArgs[0]) + unusedArgs = unusedArgs[1:] + } + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + ApplicationJSON, + false, + ) + if err != nil { + return err + } + + params := openai.AdminOrganizationProjectServiceAccountAPIKeyNewParams{} + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.Projects.ServiceAccounts.APIKeys.New( + ctx, + cmd.Value("project-id").(string), + cmd.Value("service-account-id").(string), + params, + options..., + ) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:projects:service-accounts:api-keys create", + Transform: transform, + }) +} diff --git a/pkg/cmd/adminorganizationprojectserviceaccountapikey_test.go b/pkg/cmd/adminorganizationprojectserviceaccountapikey_test.go new file mode 100644 index 0000000..f99963b --- /dev/null +++ b/pkg/cmd/adminorganizationprojectserviceaccountapikey_test.go @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package cmd + +import ( + "testing" + + "github.com/openai/openai-cli/internal/mocktest" +) + +func TestAdminOrganizationProjectsServiceAccountsAPIKeysCreate(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:projects:service-accounts:api-keys", "create", + "--project-id", "project_id", + "--service-account-id", "service_account_id", + "--name", "name", + "--scope", "string", + ) + }) + + t.Run("piping data", func(t *testing.T) { + // Test piping YAML data over stdin + pipeData := []byte("" + + "name: name\n" + + "scopes:\n" + + " - string\n") + mocktest.TestRunMockTestWithPipeAndFlags( + t, pipeData, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:projects:service-accounts:api-keys", "create", + "--project-id", "project_id", + "--service-account-id", "service_account_id", + ) + }) +} diff --git a/pkg/cmd/adminorganizationprojectspendlimit.go b/pkg/cmd/adminorganizationprojectspendlimit.go new file mode 100644 index 0000000..d5e19fa --- /dev/null +++ b/pkg/cmd/adminorganizationprojectspendlimit.go @@ -0,0 +1,211 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package cmd + +import ( + "context" + "fmt" + + "github.com/openai/openai-cli/internal/apiquery" + "github.com/openai/openai-cli/internal/requestflag" + "github.com/openai/openai-go/v3" + "github.com/openai/openai-go/v3/option" + "github.com/tidwall/gjson" + "github.com/urfave/cli/v3" +) + +var adminOrganizationProjectsSpendLimitRetrieve = cli.Command{ + Name: "retrieve", + Usage: "Get a project's hard spend limit.", + Suggest: true, + Flags: []cli.Flag{ + &requestflag.Flag[string]{ + Name: "project-id", + Required: true, + PathParam: "project_id", + }, + }, + Action: handleAdminOrganizationProjectsSpendLimitRetrieve, + HideHelpCommand: true, +} + +var adminOrganizationProjectsSpendLimitUpdate = cli.Command{ + Name: "update", + Usage: "Create or replace a project's hard spend limit.", + Suggest: true, + Flags: []cli.Flag{ + &requestflag.Flag[string]{ + Name: "project-id", + Required: true, + PathParam: "project_id", + }, + &requestflag.Flag[string]{ + Name: "currency", + Usage: "The currency for the threshold amount. Currently, only `USD` is supported.", + Required: true, + BodyPath: "currency", + }, + &requestflag.Flag[string]{ + Name: "interval", + Usage: "The time interval for evaluating spend against the threshold. Currently, only `month` is supported.", + Required: true, + BodyPath: "interval", + }, + &requestflag.Flag[int64]{ + Name: "threshold-amount", + Usage: "The hard spend limit amount, in cents.", + Required: true, + BodyPath: "threshold_amount", + }, + }, + Action: handleAdminOrganizationProjectsSpendLimitUpdate, + HideHelpCommand: true, +} + +var adminOrganizationProjectsSpendLimitDelete = cli.Command{ + Name: "delete", + Usage: "Delete a project's hard spend limit.", + Suggest: true, + Flags: []cli.Flag{ + &requestflag.Flag[string]{ + Name: "project-id", + Required: true, + PathParam: "project_id", + }, + }, + Action: handleAdminOrganizationProjectsSpendLimitDelete, + HideHelpCommand: true, +} + +func handleAdminOrganizationProjectsSpendLimitRetrieve(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + if !cmd.IsSet("project-id") && len(unusedArgs) > 0 { + cmd.Set("project-id", unusedArgs[0]) + unusedArgs = unusedArgs[1:] + } + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + EmptyBody, + false, + ) + if err != nil { + return err + } + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.Projects.SpendLimit.Get(ctx, cmd.Value("project-id").(string), options...) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:projects:spend-limit retrieve", + Transform: transform, + }) +} + +func handleAdminOrganizationProjectsSpendLimitUpdate(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + if !cmd.IsSet("project-id") && len(unusedArgs) > 0 { + cmd.Set("project-id", unusedArgs[0]) + unusedArgs = unusedArgs[1:] + } + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + ApplicationJSON, + false, + ) + if err != nil { + return err + } + + params := openai.AdminOrganizationProjectSpendLimitUpdateParams{} + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.Projects.SpendLimit.Update( + ctx, + cmd.Value("project-id").(string), + params, + options..., + ) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:projects:spend-limit update", + Transform: transform, + }) +} + +func handleAdminOrganizationProjectsSpendLimitDelete(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + if !cmd.IsSet("project-id") && len(unusedArgs) > 0 { + cmd.Set("project-id", unusedArgs[0]) + unusedArgs = unusedArgs[1:] + } + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + EmptyBody, + false, + ) + if err != nil { + return err + } + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.Projects.SpendLimit.Delete(ctx, cmd.Value("project-id").(string), options...) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:projects:spend-limit delete", + Transform: transform, + }) +} diff --git a/pkg/cmd/adminorganizationprojectspendlimit_test.go b/pkg/cmd/adminorganizationprojectspendlimit_test.go new file mode 100644 index 0000000..e655289 --- /dev/null +++ b/pkg/cmd/adminorganizationprojectspendlimit_test.go @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package cmd + +import ( + "testing" + + "github.com/openai/openai-cli/internal/mocktest" +) + +func TestAdminOrganizationProjectsSpendLimitRetrieve(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:projects:spend-limit", "retrieve", + "--project-id", "proj_123", + ) + }) +} + +func TestAdminOrganizationProjectsSpendLimitUpdate(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:projects:spend-limit", "update", + "--project-id", "proj_123", + "--currency", "USD", + "--interval", "month", + "--threshold-amount", "1", + ) + }) + + t.Run("piping data", func(t *testing.T) { + // Test piping YAML data over stdin + pipeData := []byte("" + + "currency: USD\n" + + "interval: month\n" + + "threshold_amount: 1\n") + mocktest.TestRunMockTestWithPipeAndFlags( + t, pipeData, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:projects:spend-limit", "update", + "--project-id", "proj_123", + ) + }) +} + +func TestAdminOrganizationProjectsSpendLimitDelete(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:projects:spend-limit", "delete", + "--project-id", "proj_123", + ) + }) +} diff --git a/pkg/cmd/adminorganizationspendlimit.go b/pkg/cmd/adminorganizationspendlimit.go new file mode 100644 index 0000000..79bd16f --- /dev/null +++ b/pkg/cmd/adminorganizationspendlimit.go @@ -0,0 +1,180 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package cmd + +import ( + "context" + "fmt" + + "github.com/openai/openai-cli/internal/apiquery" + "github.com/openai/openai-cli/internal/requestflag" + "github.com/openai/openai-go/v3" + "github.com/openai/openai-go/v3/option" + "github.com/tidwall/gjson" + "github.com/urfave/cli/v3" +) + +var adminOrganizationSpendLimitRetrieve = cli.Command{ + Name: "retrieve", + Usage: "Get the organization's hard spend limit.", + Suggest: true, + Flags: []cli.Flag{}, + Action: handleAdminOrganizationSpendLimitRetrieve, + HideHelpCommand: true, +} + +var adminOrganizationSpendLimitUpdate = cli.Command{ + Name: "update", + Usage: "Create or replace the organization's hard spend limit.", + Suggest: true, + Flags: []cli.Flag{ + &requestflag.Flag[string]{ + Name: "currency", + Usage: "The currency for the threshold amount. Currently, only `USD` is supported.", + Required: true, + BodyPath: "currency", + }, + &requestflag.Flag[string]{ + Name: "interval", + Usage: "The time interval for evaluating spend against the threshold. Currently, only `month` is supported.", + Required: true, + BodyPath: "interval", + }, + &requestflag.Flag[int64]{ + Name: "threshold-amount", + Usage: "The hard spend limit amount, in cents.", + Required: true, + BodyPath: "threshold_amount", + }, + }, + Action: handleAdminOrganizationSpendLimitUpdate, + HideHelpCommand: true, +} + +var adminOrganizationSpendLimitDelete = cli.Command{ + Name: "delete", + Usage: "Delete the organization's hard spend limit.", + Suggest: true, + Flags: []cli.Flag{}, + Action: handleAdminOrganizationSpendLimitDelete, + HideHelpCommand: true, +} + +func handleAdminOrganizationSpendLimitRetrieve(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + EmptyBody, + false, + ) + if err != nil { + return err + } + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.SpendLimit.Get(ctx, options...) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:spend-limit retrieve", + Transform: transform, + }) +} + +func handleAdminOrganizationSpendLimitUpdate(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + ApplicationJSON, + false, + ) + if err != nil { + return err + } + + params := openai.AdminOrganizationSpendLimitUpdateParams{} + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.SpendLimit.Update(ctx, params, options...) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:spend-limit update", + Transform: transform, + }) +} + +func handleAdminOrganizationSpendLimitDelete(ctx context.Context, cmd *cli.Command) error { + client := openai.NewClient(getDefaultRequestOptions(cmd)...) + unusedArgs := cmd.Args().Slice() + + if len(unusedArgs) > 0 { + return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs) + } + + options, err := flagOptions( + cmd, + apiquery.NestedQueryFormatBrackets, + apiquery.ArrayQueryFormatBrackets, + EmptyBody, + false, + ) + if err != nil { + return err + } + + var res []byte + options = append(options, option.WithResponseBodyInto(&res)) + _, err = client.Admin.Organization.SpendLimit.Delete(ctx, options...) + if err != nil { + return err + } + + obj := gjson.ParseBytes(res) + format := cmd.Root().String("format") + explicitFormat := cmd.Root().IsSet("format") + transform := cmd.Root().String("transform") + return ShowJSON(obj, ShowJSONOpts{ + ExplicitFormat: explicitFormat, + Format: format, + RawOutput: cmd.Root().Bool("raw-output"), + Title: "admin:organization:spend-limit delete", + Transform: transform, + }) +} diff --git a/pkg/cmd/adminorganizationspendlimit_test.go b/pkg/cmd/adminorganizationspendlimit_test.go new file mode 100644 index 0000000..8ba5d54 --- /dev/null +++ b/pkg/cmd/adminorganizationspendlimit_test.go @@ -0,0 +1,59 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package cmd + +import ( + "testing" + + "github.com/openai/openai-cli/internal/mocktest" +) + +func TestAdminOrganizationSpendLimitRetrieve(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:spend-limit", "retrieve", + ) + }) +} + +func TestAdminOrganizationSpendLimitUpdate(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:spend-limit", "update", + "--currency", "USD", + "--interval", "month", + "--threshold-amount", "1", + ) + }) + + t.Run("piping data", func(t *testing.T) { + // Test piping YAML data over stdin + pipeData := []byte("" + + "currency: USD\n" + + "interval: month\n" + + "threshold_amount: 1\n") + mocktest.TestRunMockTestWithPipeAndFlags( + t, pipeData, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:spend-limit", "update", + ) + }) +} + +func TestAdminOrganizationSpendLimitDelete(t *testing.T) { + t.Run("regular flags", func(t *testing.T) { + mocktest.TestRunMockTestWithFlags( + t, + "--api-key", "string", + "--admin-api-key", "string", + "admin:organization:spend-limit", "delete", + ) + }) +} diff --git a/pkg/cmd/betaresponse.go b/pkg/cmd/betaresponse.go index 3fe2ff7..6e19074 100644 --- a/pkg/cmd/betaresponse.go +++ b/pkg/cmd/betaresponse.go @@ -96,7 +96,7 @@ var betaResponsesCreate = requestflag.WithInnerFlags(cli.Command{ Usage: "Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).\n", BodyPath: "prompt", }, - &requestflag.Flag[string]{ + &requestflag.Flag[*string]{ Name: "prompt-cache-key", Usage: "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n", BodyPath: "prompt_cache_key", @@ -116,7 +116,7 @@ var betaResponsesCreate = requestflag.WithInnerFlags(cli.Command{ Usage: "**gpt-5 and o-series models only**\n\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\n", BodyPath: "reasoning", }, - &requestflag.Flag[string]{ + &requestflag.Flag[*string]{ Name: "safety-identifier", Usage: "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n", BodyPath: "safety_identifier", @@ -269,7 +269,7 @@ var betaResponsesCreate = requestflag.WithInnerFlags(cli.Command{ "reasoning": { &requestflag.InnerFlag[*string]{ Name: "reasoning.context", - Usage: "Controls which reasoning items are rendered back to the model on later turns.\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", + Usage: "Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", InnerField: "context", }, &requestflag.InnerFlag[*string]{ @@ -308,7 +308,7 @@ var betaResponsesCreate = requestflag.WithInnerFlags(cli.Command{ }, &requestflag.InnerFlag[*string]{ Name: "text.verbosity", - Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n", + Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n", InnerField: "verbosity", }, }, diff --git a/pkg/cmd/betaresponseinputtoken.go b/pkg/cmd/betaresponseinputtoken.go index e27681a..2935b42 100644 --- a/pkg/cmd/betaresponseinputtoken.go +++ b/pkg/cmd/betaresponseinputtoken.go @@ -90,7 +90,7 @@ var betaResponsesInputTokensCount = requestflag.WithInnerFlags(cli.Command{ "reasoning": { &requestflag.InnerFlag[*string]{ Name: "reasoning.context", - Usage: "Controls which reasoning items are rendered back to the model on later turns.\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", + Usage: "Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", InnerField: "context", }, &requestflag.InnerFlag[*string]{ @@ -122,7 +122,7 @@ var betaResponsesInputTokensCount = requestflag.WithInnerFlags(cli.Command{ }, &requestflag.InnerFlag[*string]{ Name: "text.verbosity", - Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n", + Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n", InnerField: "verbosity", }, }, diff --git a/pkg/cmd/chatcompletion.go b/pkg/cmd/chatcompletion.go index fbdbb0e..a3e1792 100644 --- a/pkg/cmd/chatcompletion.go +++ b/pkg/cmd/chatcompletion.go @@ -111,7 +111,7 @@ var chatCompletionsCreate = requestflag.WithInnerFlags(cli.Command{ Default: requestflag.Ptr[float64](0), BodyPath: "presence_penalty", }, - &requestflag.Flag[string]{ + &requestflag.Flag[*string]{ Name: "prompt-cache-key", Usage: "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n", BodyPath: "prompt_cache_key", @@ -137,7 +137,7 @@ var chatCompletionsCreate = requestflag.WithInnerFlags(cli.Command{ Usage: "An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](https://platform.openai.com/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n", BodyPath: "response_format", }, - &requestflag.Flag[string]{ + &requestflag.Flag[*string]{ Name: "safety-identifier", Usage: "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n", BodyPath: "safety_identifier", @@ -209,7 +209,7 @@ var chatCompletionsCreate = requestflag.WithInnerFlags(cli.Command{ }, &requestflag.Flag[*string]{ Name: "verbosity", - Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n", + Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n", Default: requestflag.Ptr[string]("medium"), BodyPath: "verbosity", }, diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index d8cff5e..155a3d5 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -539,6 +539,16 @@ func init() { &adminOrganizationDataRetentionUpdate, }, }, + { + Name: "admin:organization:spend-limit", + Category: "API RESOURCE", + Suggest: true, + Commands: []*cli.Command{ + &adminOrganizationSpendLimitRetrieve, + &adminOrganizationSpendLimitUpdate, + &adminOrganizationSpendLimitDelete, + }, + }, { Name: "admin:organization:spend-alerts", Category: "API RESOURCE", @@ -612,6 +622,14 @@ func init() { &adminOrganizationProjectsServiceAccountsDelete, }, }, + { + Name: "admin:organization:projects:service-accounts:api-keys", + Category: "API RESOURCE", + Suggest: true, + Commands: []*cli.Command{ + &adminOrganizationProjectsServiceAccountsAPIKeysCreate, + }, + }, { Name: "admin:organization:projects:api-keys", Category: "API RESOURCE", @@ -693,6 +711,16 @@ func init() { &adminOrganizationProjectsDataRetentionUpdate, }, }, + { + Name: "admin:organization:projects:spend-limit", + Category: "API RESOURCE", + Suggest: true, + Commands: []*cli.Command{ + &adminOrganizationProjectsSpendLimitRetrieve, + &adminOrganizationProjectsSpendLimitUpdate, + &adminOrganizationProjectsSpendLimitDelete, + }, + }, { Name: "admin:organization:projects:spend-alerts", Category: "API RESOURCE", diff --git a/pkg/cmd/inputtoken.go b/pkg/cmd/inputtoken.go index 1a63ffa..1d55c70 100644 --- a/pkg/cmd/inputtoken.go +++ b/pkg/cmd/inputtoken.go @@ -87,7 +87,7 @@ var responsesInputTokensCount = requestflag.WithInnerFlags(cli.Command{ "reasoning": { &requestflag.InnerFlag[*string]{ Name: "reasoning.context", - Usage: "Controls which reasoning items are rendered back to the model on later turns.\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", + Usage: "Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", InnerField: "context", }, &requestflag.InnerFlag[*string]{ @@ -119,7 +119,7 @@ var responsesInputTokensCount = requestflag.WithInnerFlags(cli.Command{ }, &requestflag.InnerFlag[*string]{ Name: "text.verbosity", - Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n", + Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n", InnerField: "verbosity", }, }, diff --git a/pkg/cmd/response.go b/pkg/cmd/response.go index 08acd37..cc553d8 100644 --- a/pkg/cmd/response.go +++ b/pkg/cmd/response.go @@ -91,7 +91,7 @@ var responsesCreate = requestflag.WithInnerFlags(cli.Command{ Usage: "Reference to a prompt template and its variables.\n[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).\n", BodyPath: "prompt", }, - &requestflag.Flag[string]{ + &requestflag.Flag[*string]{ Name: "prompt-cache-key", Usage: "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching).\n", BodyPath: "prompt_cache_key", @@ -111,7 +111,7 @@ var responsesCreate = requestflag.WithInnerFlags(cli.Command{ Usage: "**gpt-5 and o-series models only**\n\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\n", BodyPath: "reasoning", }, - &requestflag.Flag[string]{ + &requestflag.Flag[*string]{ Name: "safety-identifier", Usage: "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).\n", BodyPath: "safety_identifier", @@ -248,7 +248,7 @@ var responsesCreate = requestflag.WithInnerFlags(cli.Command{ "reasoning": { &requestflag.InnerFlag[*string]{ Name: "reasoning.context", - Usage: "Controls which reasoning items are rendered back to the model on later turns.\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", + Usage: "Controls which reasoning items are rendered back to the model on later turns.\nIf omitted or set to `auto`, the model determines the context mode. The\n`gpt-5.6` model family defaults to `all_turns`; earlier models default to\n`current_turn`.\n\nWhen returned on a response, this is the effective reasoning context mode\nused for the response.\n", InnerField: "context", }, &requestflag.InnerFlag[*string]{ @@ -287,7 +287,7 @@ var responsesCreate = requestflag.WithInnerFlags(cli.Command{ }, &requestflag.InnerFlag[*string]{ Name: "text.verbosity", - Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n", + Usage: "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`. The default is\n`medium`.\n", InnerField: "verbosity", }, }, diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index a2e6c7d..cf77cd0 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -2,4 +2,4 @@ package cmd -const Version = "1.4.0" // x-release-please-version +const Version = "1.5.0" // x-release-please-version