From 34db8e2154c8f0d2ceb83ff5f038083479f79bed Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Wed, 4 Nov 2026 08:53:43 -0800 Subject: [PATCH] feat!: default Gemini API version to v1 instead of v1beta across SDKs BREAKING CHANGE: Gemini Developer API clients now default to API version `v1` instead of `v1beta`. Only the Gemini Developer API is affected; Gemini Enterprise Agent Platform (Vertex AI) clients are unchanged and still default to `v1beta1`. The easiest way to avoid any breakage is to set the environment variable `GOOGLE_GENAI_API_VERSION=beta`, which restores the previous defaults (`v1beta` for the Gemini Developer API, `v1beta1` for Vertex AI) without code changes. Alternatively, set the API version explicitly in the client's HTTP options. feat: support GOOGLE_GENAI_API_VERSION environment variable across SDKs Sets the API version when none is configured in code. `beta` selects `v1beta` for the Gemini Developer API and `v1beta1` for Gemini Enterprise Agent Platform; any other value is used as the version verbatim. An API version set in code takes precedence over the environment variable. PiperOrigin-RevId: 1013891593 --- USAGE.md | 2 +- internal/cli/configure.go | 2 +- internal/cli/custom/custom_test.go | 8 ++++---- internal/cli/custom/media.go | 4 ++-- internal/cli/custom/rawhttp.go | 4 ++-- internal/cli/root.go | 2 +- .../sdk/models/operations/cancelinteractionbyid.go | 8 ++++---- internal/sdk/models/operations/createagent.go | 8 ++++---- internal/sdk/models/operations/createcredential.go | 8 ++++---- internal/sdk/models/operations/createenvironment.go | 8 ++++---- internal/sdk/models/operations/createinteraction.go | 8 ++++---- internal/sdk/models/operations/createwebhook.go | 8 ++++---- internal/sdk/models/operations/deleteagent.go | 8 ++++---- internal/sdk/models/operations/deletecredential.go | 8 ++++---- internal/sdk/models/operations/deleteenvironment.go | 8 ++++---- internal/sdk/models/operations/deleteinteraction.go | 8 ++++---- internal/sdk/models/operations/deletetrigger.go | 8 ++++---- internal/sdk/models/operations/deletewebhook.go | 8 ++++---- internal/sdk/models/operations/filesdelete.go | 8 ++++---- internal/sdk/models/operations/filesget.go | 8 ++++---- internal/sdk/models/operations/fileslist.go | 8 ++++---- internal/sdk/models/operations/filesregister.go | 8 ++++---- internal/sdk/models/operations/generatedfileslist.go | 8 ++++---- internal/sdk/models/operations/getagent.go | 8 ++++---- internal/sdk/models/operations/getcredential.go | 8 ++++---- internal/sdk/models/operations/getenvironment.go | 8 ++++---- internal/sdk/models/operations/getenvironmentfiles.go | 8 ++++---- internal/sdk/models/operations/getinteractionbyid.go | 8 ++++---- internal/sdk/models/operations/gettrigger.go | 8 ++++---- internal/sdk/models/operations/getwebhook.go | 8 ++++---- internal/sdk/models/operations/listagents.go | 8 ++++---- internal/sdk/models/operations/listcredentials.go | 8 ++++---- internal/sdk/models/operations/listenvironments.go | 8 ++++---- .../sdk/models/operations/listtriggerexecutions.go | 8 ++++---- internal/sdk/models/operations/listtriggers.go | 8 ++++---- internal/sdk/models/operations/listwebhooks.go | 8 ++++---- internal/sdk/models/operations/modelsget.go | 8 ++++---- internal/sdk/models/operations/modelslist.go | 8 ++++---- internal/sdk/models/operations/pingwebhook.go | 8 ++++---- internal/sdk/models/operations/rotatesigningsecret.go | 8 ++++---- internal/sdk/models/operations/runtrigger.go | 8 ++++---- internal/sdk/models/operations/updatecredential.go | 8 ++++---- internal/sdk/models/operations/updatetrigger.go | 8 ++++---- internal/sdk/models/operations/updatewebhook.go | 8 ++++---- internal/sdk/sdkinternal/globals/globals.go | 4 ++-- internal/usage/schema.go | 4 ++-- tests/contract/cli_contract_test.go | 10 +++++----- tests/contract/porcelain_interactive_test.go | 8 ++++---- 48 files changed, 176 insertions(+), 176 deletions(-) diff --git a/USAGE.md b/USAGE.md index b5a4dc8..44e6c56 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,6 +1,6 @@ ```bash -gemini-api agent list --api-key test_api_key --api-version v1beta +gemini-api agent list --api-key test_api_key --api-version v1 ``` \ No newline at end of file diff --git a/internal/cli/configure.go b/internal/cli/configure.go index 810526b..b2e7abb 100644 --- a/internal/cli/configure.go +++ b/internal/cli/configure.go @@ -185,7 +185,7 @@ func runConfigureCmd(cmd *cobra.Command, args []string) error { forms.NewInput(&cfgGlobalApiVersion). Title("Which version of the API to use"). Description("--api-version"). - Placeholder(cmp.Or(cfg.Globals.ApiVersion, "v1beta")), + Placeholder(cmp.Or(cfg.Globals.ApiVersion, "v1")), forms.NewInput(&cfgGlobalApiRevision). Title("Interactions API revision to request"). Description("--api-revision"). diff --git a/internal/cli/custom/custom_test.go b/internal/cli/custom/custom_test.go index 1e10517..eeae268 100644 --- a/internal/cli/custom/custom_test.go +++ b/internal/cli/custom/custom_test.go @@ -1676,8 +1676,8 @@ func TestAttachInteractionInputsAndNormalizeFilesURIs(t *testing.T) { } inputs, _ := parsed["input"].([]any) imgPart, _ := inputs[0].(map[string]any) - if imgPart["uri"] != "https://generativelanguage.googleapis.com/v1beta/files/abc123" { - t.Errorf("uri = %v, want full v1beta files URI", imgPart["uri"]) + if imgPart["uri"] != "https://generativelanguage.googleapis.com/v1/files/abc123" { + t.Errorf("uri = %v, want full v1 files URI", imgPart["uri"]) } }) @@ -1794,7 +1794,7 @@ func TestAttachInteractionInputsAndNormalizeFilesURIs(t *testing.T) { if err := rootDry.Execute(); err != nil { t.Fatalf("Execute custom server-url --dry-run failed: %v", err) } - if !strings.Contains(gotBody, "https://generativelanguage.googleapis.com/v1beta/files/abc123") || strings.Contains(gotBody, "custom.example.com") { + if !strings.Contains(gotBody, "https://generativelanguage.googleapis.com/v1/files/abc123") || strings.Contains(gotBody, "custom.example.com") { t.Errorf("dry-run body = %s, want canonical Files API expansion independent of --server-url", gotBody) } @@ -1807,7 +1807,7 @@ func TestAttachInteractionInputsAndNormalizeFilesURIs(t *testing.T) { if filesGetCalls != 0 { t.Errorf("filesGetCalls = %d, want 0 when mime_type is set", filesGetCalls) } - if !strings.Contains(gotBody, `"uri":"https://generativelanguage.googleapis.com/v1beta/files/abc123"`) || strings.Contains(gotBody, srv.URL) { + if !strings.Contains(gotBody, `"uri":"https://generativelanguage.googleapis.com/v1/files/abc123"`) || strings.Contains(gotBody, srv.URL) { t.Errorf("body = %s, want --server-url Files URI rewritten to the canonical Files API URI", gotBody) } }) diff --git a/internal/cli/custom/media.go b/internal/cli/custom/media.go index b0d8dea..40e9ace 100644 --- a/internal/cli/custom/media.go +++ b/internal/cli/custom/media.go @@ -532,7 +532,7 @@ func resolveMediaSource(cmd *cobra.Command, s *sdk.GeminiAPI, arg, mimeOverride // its URI and MIME type. Under --dry-run the lookup is previewed and a // placeholder URI is used so the main request can still be previewed. func resolveRemoteFile(cmd *cobra.Command, s *sdk.GeminiAPI, name, id, mimeOverride, ref string, policy mediaPolicy) (*mediaSource, error) { - fileURI := "https://generativelanguage.googleapis.com/v1beta/" + name + fileURI := expandedFilesURI(cmd, name) mimeType := strings.ToLower(strings.TrimSpace(mimeOverride)) if err := checkRemoteMIME(mimeType, ref, policy); err != nil { return nil, err // a bad override fails before the lookup is sent @@ -1029,7 +1029,7 @@ func normalizeInputValueFileURIs(cmd *cobra.Command, s **sdk.GeminiAPI, val any) // uri in a files.get response does. func expandedFilesURI(cmd *cobra.Command, name string) string { base := "https://generativelanguage.googleapis.com" - ver := "v1beta" + ver := "v1" if cmd != nil && flagutil.FlagChanged(cmd, "api-version") { if v, ok := flagutil.GetStringFlag(cmd, "api-version"); ok && strings.TrimSpace(v) != "" { ver = strings.Trim(strings.TrimSpace(v), "/") diff --git a/internal/cli/custom/rawhttp.go b/internal/cli/custom/rawhttp.go index 1aa4a6f..9384ffe 100644 --- a/internal/cli/custom/rawhttp.go +++ b/internal/cli/custom/rawhttp.go @@ -81,7 +81,7 @@ func newRawTransport(cmd *cobra.Command) (*rawTransport, error) { } t.baseURL = strings.TrimRight(t.baseURL, "/") - // API version: flag > env/config > flag default (v1beta). An explicitly + // API version: flag > env/config > flag default (v1). An explicitly // empty flag is invalid; only an absent value may fall back to the default. apiVersionExplicit := flagutil.FlagChanged(cmd, "api-version") if apiVersionExplicit { @@ -92,7 +92,7 @@ func newRawTransport(cmd *cobra.Command) (*rawTransport, error) { t.apiVersion, _ = flagutil.GetStringFlag(cmd, "api-version") } if t.apiVersion == "" && !apiVersionExplicit { - t.apiVersion = "v1beta" + t.apiVersion = "v1" } // The generated client's request hook holds the version to one path // segment; that hook does not run here, and the version is spliced into the diff --git a/internal/cli/root.go b/internal/cli/root.go index c42a525..ff84619 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -193,7 +193,7 @@ func NewRootCommand() (*cobra.Command, error) { rootCmd.PersistentFlags().Bool("no-keyring", false, "Never read or write the OS keychain; store secrets in the config file instead (env: GEMINI_NO_KEYRING)") _ = rootCmd.PersistentFlags().SetAnnotation("no-keyring", "speakeasy:group", []string{"Authentication"}) // Global parameter flags - rootCmd.PersistentFlags().String("api-version", "v1beta", "Which version of the API to use (env: GEMINI_API_VERSION)") + rootCmd.PersistentFlags().String("api-version", "v1", "Which version of the API to use (env: GEMINI_API_VERSION)") _ = rootCmd.PersistentFlags().SetAnnotation("api-version", "speakeasy:group", []string{"API Parameters"}) rootCmd.PersistentFlags().String("api-revision", "", "Interactions API revision to request (env: GEMINI_API_REVISION)") _ = rootCmd.PersistentFlags().SetAnnotation("api-revision", "speakeasy:group", []string{"API Parameters"}) diff --git a/internal/sdk/models/operations/cancelinteractionbyid.go b/internal/sdk/models/operations/cancelinteractionbyid.go index 2c06941..f2925b0 100644 --- a/internal/sdk/models/operations/cancelinteractionbyid.go +++ b/internal/sdk/models/operations/cancelinteractionbyid.go @@ -23,8 +23,8 @@ import ( ) type CancelInteractionByIDGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (c *CancelInteractionByIDGlobals) GetAPIRevision() *string { type CancelInteractionByIDRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The name of the interaction to cancel. ID string `pathParam:"style=simple,explode=false,name=interactionsId"` } diff --git a/internal/sdk/models/operations/createagent.go b/internal/sdk/models/operations/createagent.go index 80f81d0..5bc535a 100644 --- a/internal/sdk/models/operations/createagent.go +++ b/internal/sdk/models/operations/createagent.go @@ -23,8 +23,8 @@ import ( ) type CreateAgentGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (c *CreateAgentGlobals) GetAPIRevision() *string { type CreateAgentRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The request body. Body agents.Agent `request:"mediaType=application/json"` } diff --git a/internal/sdk/models/operations/createcredential.go b/internal/sdk/models/operations/createcredential.go index 73bfa8a..8b3dfaf 100644 --- a/internal/sdk/models/operations/createcredential.go +++ b/internal/sdk/models/operations/createcredential.go @@ -23,8 +23,8 @@ import ( ) type CreateCredentialGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (c CreateCredentialGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (c *CreateCredentialGlobals) GetAPIVersion() *string { } type CreateCredentialRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The request body. Body credentials.CredentialCreateParams `request:"mediaType=application/json"` } diff --git a/internal/sdk/models/operations/createenvironment.go b/internal/sdk/models/operations/createenvironment.go index e9d72cf..c08596c 100644 --- a/internal/sdk/models/operations/createenvironment.go +++ b/internal/sdk/models/operations/createenvironment.go @@ -23,8 +23,8 @@ import ( ) type CreateEnvironmentGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (c CreateEnvironmentGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (c *CreateEnvironmentGlobals) GetAPIVersion() *string { } type CreateEnvironmentRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The request body. Body environments.CreateEnvironmentRequest `request:"mediaType=application/json"` } diff --git a/internal/sdk/models/operations/createinteraction.go b/internal/sdk/models/operations/createinteraction.go index 1b2b7f3..906c986 100644 --- a/internal/sdk/models/operations/createinteraction.go +++ b/internal/sdk/models/operations/createinteraction.go @@ -27,8 +27,8 @@ import ( ) type CreateInteractionGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -158,8 +158,8 @@ func (u CreateInteractionRequestBody) MarshalJSON() ([]byte, error) { type CreateInteractionRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // The request body. Body CreateInteractionRequestBody `request:"mediaType=application/json"` } diff --git a/internal/sdk/models/operations/createwebhook.go b/internal/sdk/models/operations/createwebhook.go index 6565529..6131bc5 100644 --- a/internal/sdk/models/operations/createwebhook.go +++ b/internal/sdk/models/operations/createwebhook.go @@ -23,8 +23,8 @@ import ( ) type CreateWebhookGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (c *CreateWebhookGlobals) GetAPIRevision() *string { type CreateWebhookRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The request body. Body webhooks.WebhookInput `request:"mediaType=application/json"` } diff --git a/internal/sdk/models/operations/deleteagent.go b/internal/sdk/models/operations/deleteagent.go index 29b344d..1547899 100644 --- a/internal/sdk/models/operations/deleteagent.go +++ b/internal/sdk/models/operations/deleteagent.go @@ -23,8 +23,8 @@ import ( ) type DeleteAgentGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (d *DeleteAgentGlobals) GetAPIRevision() *string { type DeleteAgentRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The name of the agent to delete. ID string `pathParam:"style=simple,explode=false,name=agentsId"` } diff --git a/internal/sdk/models/operations/deletecredential.go b/internal/sdk/models/operations/deletecredential.go index 3e01ca0..c7105d6 100644 --- a/internal/sdk/models/operations/deletecredential.go +++ b/internal/sdk/models/operations/deletecredential.go @@ -23,8 +23,8 @@ import ( ) type DeleteCredentialGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (d DeleteCredentialGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (d *DeleteCredentialGlobals) GetAPIVersion() *string { } type DeleteCredentialRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Credential ID, as given on create ID string `pathParam:"style=simple,explode=false,name=id"` } diff --git a/internal/sdk/models/operations/deleteenvironment.go b/internal/sdk/models/operations/deleteenvironment.go index 734c5db..7c3c465 100644 --- a/internal/sdk/models/operations/deleteenvironment.go +++ b/internal/sdk/models/operations/deleteenvironment.go @@ -23,8 +23,8 @@ import ( ) type DeleteEnvironmentGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (d DeleteEnvironmentGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (d *DeleteEnvironmentGlobals) GetAPIVersion() *string { } type DeleteEnvironmentRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. Resource ID segment making up resource `name`. It identifies the resource // within its parent collection as described in https://google.aip.dev/122. ID string `pathParam:"style=simple,explode=false,name=id"` diff --git a/internal/sdk/models/operations/deleteinteraction.go b/internal/sdk/models/operations/deleteinteraction.go index ac0bc7d..4dfb64b 100644 --- a/internal/sdk/models/operations/deleteinteraction.go +++ b/internal/sdk/models/operations/deleteinteraction.go @@ -22,8 +22,8 @@ import ( ) type DeleteInteractionGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -56,8 +56,8 @@ func (d *DeleteInteractionGlobals) GetAPIRevision() *string { type DeleteInteractionRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The name of the interaction to delete. ID string `pathParam:"style=simple,explode=false,name=interactionsId"` } diff --git a/internal/sdk/models/operations/deletetrigger.go b/internal/sdk/models/operations/deletetrigger.go index b0443e1..7cea0ec 100644 --- a/internal/sdk/models/operations/deletetrigger.go +++ b/internal/sdk/models/operations/deletetrigger.go @@ -23,8 +23,8 @@ import ( ) type DeleteTriggerGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (d *DeleteTriggerGlobals) GetAPIRevision() *string { type DeleteTriggerRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. Resource name of the trigger. ID string `pathParam:"style=simple,explode=false,name=id"` } diff --git a/internal/sdk/models/operations/deletewebhook.go b/internal/sdk/models/operations/deletewebhook.go index 98afcf4..9d11984 100644 --- a/internal/sdk/models/operations/deletewebhook.go +++ b/internal/sdk/models/operations/deletewebhook.go @@ -23,8 +23,8 @@ import ( ) type DeleteWebhookGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (d *DeleteWebhookGlobals) GetAPIRevision() *string { type DeleteWebhookRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The ID of the webhook to delete. ID string `pathParam:"style=simple,explode=false,name=id"` } diff --git a/internal/sdk/models/operations/filesdelete.go b/internal/sdk/models/operations/filesdelete.go index bbe4a19..cfa8a51 100644 --- a/internal/sdk/models/operations/filesdelete.go +++ b/internal/sdk/models/operations/filesdelete.go @@ -23,8 +23,8 @@ import ( ) type FilesDeleteGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (f FilesDeleteGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (f *FilesDeleteGlobals) GetAPIVersion() *string { } type FilesDeleteRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // File to delete, as files/ or a bare id File string `pathParam:"style=simple,explode=false,name=file"` } diff --git a/internal/sdk/models/operations/filesget.go b/internal/sdk/models/operations/filesget.go index a1b8014..34c9d5e 100644 --- a/internal/sdk/models/operations/filesget.go +++ b/internal/sdk/models/operations/filesget.go @@ -23,8 +23,8 @@ import ( ) type FilesGetGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (f FilesGetGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (f *FilesGetGlobals) GetAPIVersion() *string { } type FilesGetRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // File to get, as files/ or a bare id File string `pathParam:"style=simple,explode=false,name=file"` } diff --git a/internal/sdk/models/operations/fileslist.go b/internal/sdk/models/operations/fileslist.go index f87f91c..f7c9530 100644 --- a/internal/sdk/models/operations/fileslist.go +++ b/internal/sdk/models/operations/fileslist.go @@ -23,8 +23,8 @@ import ( ) type FilesListGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (f FilesListGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (f *FilesListGlobals) GetAPIVersion() *string { } type FilesListRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Maximum number of files to return per page (default 10, maximum 100) PageSize *int `queryParam:"style=form,explode=true,name=pageSize"` // Page token from a previous files list call diff --git a/internal/sdk/models/operations/filesregister.go b/internal/sdk/models/operations/filesregister.go index 80809db..27b75dc 100644 --- a/internal/sdk/models/operations/filesregister.go +++ b/internal/sdk/models/operations/filesregister.go @@ -23,8 +23,8 @@ import ( ) type FilesRegisterGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (f FilesRegisterGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (f *FilesRegisterGlobals) GetAPIVersion() *string { } type FilesRegisterRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` Body genai.RegisterFilesRequest `request:"mediaType=application/json"` } diff --git a/internal/sdk/models/operations/generatedfileslist.go b/internal/sdk/models/operations/generatedfileslist.go index 16e630a..ebacf4a 100644 --- a/internal/sdk/models/operations/generatedfileslist.go +++ b/internal/sdk/models/operations/generatedfileslist.go @@ -23,8 +23,8 @@ import ( ) type GeneratedFilesListGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (g GeneratedFilesListGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (g *GeneratedFilesListGlobals) GetAPIVersion() *string { } type GeneratedFilesListRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Maximum number of generated files to return per page (default 10, maximum 50) PageSize *int `queryParam:"style=form,explode=true,name=pageSize"` // Page token from a previous generated-files list call diff --git a/internal/sdk/models/operations/getagent.go b/internal/sdk/models/operations/getagent.go index 8fd8fd4..8aee317 100644 --- a/internal/sdk/models/operations/getagent.go +++ b/internal/sdk/models/operations/getagent.go @@ -23,8 +23,8 @@ import ( ) type GetAgentGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (g *GetAgentGlobals) GetAPIRevision() *string { type GetAgentRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The name of the agent to retrieve. ID string `pathParam:"style=simple,explode=false,name=agentsId"` } diff --git a/internal/sdk/models/operations/getcredential.go b/internal/sdk/models/operations/getcredential.go index 9a79adb..7210de1 100644 --- a/internal/sdk/models/operations/getcredential.go +++ b/internal/sdk/models/operations/getcredential.go @@ -23,8 +23,8 @@ import ( ) type GetCredentialGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (g GetCredentialGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (g *GetCredentialGlobals) GetAPIVersion() *string { } type GetCredentialRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Credential ID, as given on create ID string `pathParam:"style=simple,explode=false,name=id"` } diff --git a/internal/sdk/models/operations/getenvironment.go b/internal/sdk/models/operations/getenvironment.go index fd664d7..a23f70d 100644 --- a/internal/sdk/models/operations/getenvironment.go +++ b/internal/sdk/models/operations/getenvironment.go @@ -23,8 +23,8 @@ import ( ) type GetEnvironmentGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (g GetEnvironmentGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (g *GetEnvironmentGlobals) GetAPIVersion() *string { } type GetEnvironmentRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. Resource ID segment making up resource `name`. It identifies the resource // within its parent collection as described in https://google.aip.dev/122. ID string `pathParam:"style=simple,explode=false,name=id"` diff --git a/internal/sdk/models/operations/getenvironmentfiles.go b/internal/sdk/models/operations/getenvironmentfiles.go index b39d7d8..6794ea0 100644 --- a/internal/sdk/models/operations/getenvironmentfiles.go +++ b/internal/sdk/models/operations/getenvironmentfiles.go @@ -23,8 +23,8 @@ import ( ) type GetEnvironmentFilesGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (g GetEnvironmentFilesGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (g *GetEnvironmentFilesGlobals) GetAPIVersion() *string { } type GetEnvironmentFilesRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Environment to read, as environments/ or a bare id Environment string `pathParam:"style=simple,explode=false,name=environment"` // File or directory path relative to the workspace root, e.g. src; a leading slash is ignored diff --git a/internal/sdk/models/operations/getinteractionbyid.go b/internal/sdk/models/operations/getinteractionbyid.go index 9fda252..b2461f6 100644 --- a/internal/sdk/models/operations/getinteractionbyid.go +++ b/internal/sdk/models/operations/getinteractionbyid.go @@ -24,8 +24,8 @@ import ( ) type GetInteractionByIDGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -58,8 +58,8 @@ func (g *GetInteractionByIDGlobals) GetAPIRevision() *string { type GetInteractionByIDRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // If true, includes the input in the response. IncludeInput *bool `queryParam:"style=form,explode=true,name=include_input"` // Required. The name of the interaction to retrieve. diff --git a/internal/sdk/models/operations/gettrigger.go b/internal/sdk/models/operations/gettrigger.go index a5778db..94b2db7 100644 --- a/internal/sdk/models/operations/gettrigger.go +++ b/internal/sdk/models/operations/gettrigger.go @@ -23,8 +23,8 @@ import ( ) type GetTriggerGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (g *GetTriggerGlobals) GetAPIRevision() *string { type GetTriggerRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. Resource name of the trigger. ID string `pathParam:"style=simple,explode=false,name=id"` } diff --git a/internal/sdk/models/operations/getwebhook.go b/internal/sdk/models/operations/getwebhook.go index e2a282a..f48ad6a 100644 --- a/internal/sdk/models/operations/getwebhook.go +++ b/internal/sdk/models/operations/getwebhook.go @@ -23,8 +23,8 @@ import ( ) type GetWebhookGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (g *GetWebhookGlobals) GetAPIRevision() *string { type GetWebhookRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The ID of the webhook to retrieve. ID string `pathParam:"style=simple,explode=false,name=id"` } diff --git a/internal/sdk/models/operations/listagents.go b/internal/sdk/models/operations/listagents.go index d7db9ed..7ec71b4 100644 --- a/internal/sdk/models/operations/listagents.go +++ b/internal/sdk/models/operations/listagents.go @@ -23,8 +23,8 @@ import ( ) type ListAgentsGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (l *ListAgentsGlobals) GetAPIRevision() *string { type ListAgentsRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Maximum number of agents to return per page PageSize *int `queryParam:"style=form,explode=true,name=page_size"` // Page token from a previous agent list call diff --git a/internal/sdk/models/operations/listcredentials.go b/internal/sdk/models/operations/listcredentials.go index 52ce97a..e212977 100644 --- a/internal/sdk/models/operations/listcredentials.go +++ b/internal/sdk/models/operations/listcredentials.go @@ -23,8 +23,8 @@ import ( ) type ListCredentialsGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (l ListCredentialsGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (l *ListCredentialsGlobals) GetAPIVersion() *string { } type ListCredentialsRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Optional. Maximum number of credentials to return. PageSize *int `queryParam:"style=form,explode=true,name=page_size"` // Optional. Pagination token. diff --git a/internal/sdk/models/operations/listenvironments.go b/internal/sdk/models/operations/listenvironments.go index 978542d..ef204dc 100644 --- a/internal/sdk/models/operations/listenvironments.go +++ b/internal/sdk/models/operations/listenvironments.go @@ -23,8 +23,8 @@ import ( ) type ListEnvironmentsGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (l ListEnvironmentsGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (l *ListEnvironmentsGlobals) GetAPIVersion() *string { } type ListEnvironmentsRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Optional. Maximum number of environments to return. // If unspecified, defaults to 50. Maximum is 1000. PageSize *int `queryParam:"style=form,explode=true,name=page_size"` diff --git a/internal/sdk/models/operations/listtriggerexecutions.go b/internal/sdk/models/operations/listtriggerexecutions.go index 606586a..87af546 100644 --- a/internal/sdk/models/operations/listtriggerexecutions.go +++ b/internal/sdk/models/operations/listtriggerexecutions.go @@ -23,8 +23,8 @@ import ( ) type ListTriggerExecutionsGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (l *ListTriggerExecutionsGlobals) GetAPIRevision() *string { type ListTriggerExecutionsRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // The maximum number of executions to return per page. PageSize *int `queryParam:"style=form,explode=true,name=page_size"` // A page token from a previous ListTriggerExecutions call. diff --git a/internal/sdk/models/operations/listtriggers.go b/internal/sdk/models/operations/listtriggers.go index 3cb91d6..bcda5ea 100644 --- a/internal/sdk/models/operations/listtriggers.go +++ b/internal/sdk/models/operations/listtriggers.go @@ -23,8 +23,8 @@ import ( ) type ListTriggersGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (l *ListTriggersGlobals) GetAPIRevision() *string { type ListTriggersRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Optional. Filter expression (e.g., by state). Filter *string `queryParam:"style=form,explode=true,name=filter"` // Optional. The maximum number of triggers to return per page. diff --git a/internal/sdk/models/operations/listwebhooks.go b/internal/sdk/models/operations/listwebhooks.go index a46ba6a..de61b9d 100644 --- a/internal/sdk/models/operations/listwebhooks.go +++ b/internal/sdk/models/operations/listwebhooks.go @@ -23,8 +23,8 @@ import ( ) type ListWebhooksGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (l *ListWebhooksGlobals) GetAPIRevision() *string { type ListWebhooksRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Optional. The maximum number of webhooks to return. The service may return // fewer than this value. If unspecified, at most 50 webhooks will be // returned. The maximum value is 1000. diff --git a/internal/sdk/models/operations/modelsget.go b/internal/sdk/models/operations/modelsget.go index cbbfe15..f1c5599 100644 --- a/internal/sdk/models/operations/modelsget.go +++ b/internal/sdk/models/operations/modelsget.go @@ -23,8 +23,8 @@ import ( ) type ModelsGetGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (m ModelsGetGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (m *ModelsGetGlobals) GetAPIVersion() *string { } type ModelsGetRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Model id, e.g. gemini-flash-latest Model string `pathParam:"style=simple,explode=false,name=model"` } diff --git a/internal/sdk/models/operations/modelslist.go b/internal/sdk/models/operations/modelslist.go index 34db963..701c572 100644 --- a/internal/sdk/models/operations/modelslist.go +++ b/internal/sdk/models/operations/modelslist.go @@ -23,8 +23,8 @@ import ( ) type ModelsListGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (m ModelsListGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (m *ModelsListGlobals) GetAPIVersion() *string { } type ModelsListRequest struct { - // Which version of the API to use. Defaults to v1beta. - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Maximum number of models to return per page (default 1000, maximum 1000) PageSize *int `default:"1000" queryParam:"style=form,explode=true,name=pageSize"` // Page token from a previous models list call diff --git a/internal/sdk/models/operations/pingwebhook.go b/internal/sdk/models/operations/pingwebhook.go index 59de1bf..8043a01 100644 --- a/internal/sdk/models/operations/pingwebhook.go +++ b/internal/sdk/models/operations/pingwebhook.go @@ -23,8 +23,8 @@ import ( ) type PingWebhookGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (p *PingWebhookGlobals) GetAPIRevision() *string { type PingWebhookRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The ID of the webhook to ping. ID string `pathParam:"style=simple,explode=false,name=id"` // The request body. diff --git a/internal/sdk/models/operations/rotatesigningsecret.go b/internal/sdk/models/operations/rotatesigningsecret.go index 6ba3212..2949b42 100644 --- a/internal/sdk/models/operations/rotatesigningsecret.go +++ b/internal/sdk/models/operations/rotatesigningsecret.go @@ -23,8 +23,8 @@ import ( ) type RotateSigningSecretGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (r *RotateSigningSecretGlobals) GetAPIRevision() *string { type RotateSigningSecretRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The ID of the webhook for which to generate a signing secret. ID string `pathParam:"style=simple,explode=false,name=id"` // Required. The request body. diff --git a/internal/sdk/models/operations/runtrigger.go b/internal/sdk/models/operations/runtrigger.go index 3730a8e..90a1602 100644 --- a/internal/sdk/models/operations/runtrigger.go +++ b/internal/sdk/models/operations/runtrigger.go @@ -23,8 +23,8 @@ import ( ) type RunTriggerGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (r *RunTriggerGlobals) GetAPIRevision() *string { type RunTriggerRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. Resource name of the trigger. ID string `pathParam:"style=simple,explode=false,name=triggerId"` } diff --git a/internal/sdk/models/operations/updatecredential.go b/internal/sdk/models/operations/updatecredential.go index 250a5c3..1d3ad31 100644 --- a/internal/sdk/models/operations/updatecredential.go +++ b/internal/sdk/models/operations/updatecredential.go @@ -23,8 +23,8 @@ import ( ) type UpdateCredentialGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` } func (u UpdateCredentialGlobals) MarshalJSON() ([]byte, error) { @@ -46,8 +46,8 @@ func (u *UpdateCredentialGlobals) GetAPIVersion() *string { } type UpdateCredentialRequest struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Credential ID, as given on create ID string `pathParam:"style=simple,explode=false,name=id"` // Optional. The list of fields to update. diff --git a/internal/sdk/models/operations/updatetrigger.go b/internal/sdk/models/operations/updatetrigger.go index 43f66fd..ecadc00 100644 --- a/internal/sdk/models/operations/updatetrigger.go +++ b/internal/sdk/models/operations/updatetrigger.go @@ -23,8 +23,8 @@ import ( ) type UpdateTriggerGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (u *UpdateTriggerGlobals) GetAPIRevision() *string { type UpdateTriggerRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. Resource name of the trigger. ID string `pathParam:"style=simple,explode=false,name=id"` // Required. The trigger with updated fields. diff --git a/internal/sdk/models/operations/updatewebhook.go b/internal/sdk/models/operations/updatewebhook.go index b29df9c..51ce63c 100644 --- a/internal/sdk/models/operations/updatewebhook.go +++ b/internal/sdk/models/operations/updatewebhook.go @@ -23,8 +23,8 @@ import ( ) type UpdateWebhookGlobals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` } @@ -57,8 +57,8 @@ func (u *UpdateWebhookGlobals) GetAPIRevision() *string { type UpdateWebhookRequest struct { // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Required. The ID of the webhook to update. ID string `pathParam:"style=simple,explode=false,name=id"` // Optional list of fields to update. diff --git a/internal/sdk/sdkinternal/globals/globals.go b/internal/sdk/sdkinternal/globals/globals.go index a57a41e..2aa58ab 100644 --- a/internal/sdk/sdkinternal/globals/globals.go +++ b/internal/sdk/sdkinternal/globals/globals.go @@ -21,8 +21,8 @@ import ( ) type Globals struct { - // Which version of the API to use. Defaults to v1beta (the only version covering the full interactions surface). - APIVersion *string `default:"v1beta" pathParam:"style=simple,explode=false,name=api_version"` + // Which version of the API to use. Defaults to v1. + APIVersion *string `default:"v1" pathParam:"style=simple,explode=false,name=api_version"` // Interactions API revision to request. Omitted by default (matching the official SDKs), so the service serves its current revision. APIRevision *string `header:"style=simple,explode=false,name=Api-Revision"` // Quota project header to send with Google GenAI API requests. diff --git a/internal/usage/schema.go b/internal/usage/schema.go index c3501ae..cbba6b1 100644 --- a/internal/usage/schema.go +++ b/internal/usage/schema.go @@ -43,7 +43,7 @@ type usageNode struct { } var usageNodes = map[string]usageNode{ - "": {head: "name \"gemini-api\"\nbin \"gemini-api\"\nabout \"\"\"\n Gemini API: Use the Gemini Interactions API and managed-agent platform from the command line.\n\n Get started:\n Set GEMINI_API_KEY, or run: gemini-api configure\n Then run a model or managed agent: gemini-api agent --help\n Add --dry-run to preview any API call without sending it.\n \"\"\"\nversion \"0.4.5\"\nconfig {\n file \"~/.config/gemini-api/config.yaml\"\n}", flags: []usageItem{{key: "usage", text: "flag \"--usage\" help=\"Print the CLI Usage schema in KDL format\" global=#true"}, {key: "help-global", text: "flag \"--help-global\" help=\"Print global flags shared by every command\""}, {key: "version", text: "flag \"-v --version\" help=\"Print the CLI version\""}, {key: "output-format", text: "flag \"-o --output-format \" help=\"Specify the output format. Options: pretty, json, yaml, table, toon.\" global=#true config=\"output_format\" default=\"pretty\""}, {key: "color", text: "flag \"--color \" help=\"Control colored output: auto (color when output is a TTY), always, or never. Respects NO_COLOR and FORCE_COLOR env vars.\" global=#true default=\"auto\""}, {key: "jq", text: "flag \"-q --jq \" help=\"Filter and transform output using a jq expression (e.g., '.name', '.items[] | .id')\" global=#true"}, {key: "raw-output", text: "flag \"--raw-output\" help=\"Write --jq string results as raw text instead of JSON strings (like jq -r); non-string results stay JSON\" global=#true default=#true"}, {key: "server-url", text: "flag \"--server-url \" help=\"Override the default server URL\" global=#true"}, {key: "header", text: "flag \"-H --header \" help=\"Set a custom HTTP request header (format: \\\"Key: Value\\\"). Can be specified multiple times.\" global=#true var=#true"}, {key: "include-headers", text: "flag \"--include-headers\" help=\"Include HTTP response headers in the output\" global=#true default=#false"}, {key: "timeout", text: "flag \"--timeout \" help=\"HTTP request timeout (e.g., 30s, 5m, 100ms)\" global=#true config=\"timeout\""}, {key: "interactive", text: "flag \"--interactive\" help=\"Prompt for missing inputs and open guided configure/auth forms (forms fall back to line prompts on stdin off-TTY)\" global=#true default=#false"}, {key: "no-interactive", text: "flag \"--no-interactive\" help=\"Disable all interactive features (auto-prompting, explorer auto-launch, TUI forms)\" global=#true default=#false"}, {key: "dry-run", text: "flag \"--dry-run\" help=\"Preview API requests without sending them (no network, no OS keychain). Human preview on stderr; with -o json or --jq, one JSON object per request on stdout. Local mutation commands (auth login, auth logout and configure) make no request: they skip prompts and writes and report a no-op (stderr, or one JSON object on stdout in the machine form)\" global=#true default=#false"}, {key: "debug", text: "flag \"-d --debug\" help=\"Log request and response diagnostics to stderr\" global=#true default=#false"}, {key: "agent-mode", text: "flag \"--agent-mode\" help=\"Enable structured errors and default TOON output for AI coding agents.\" global=#true default=#false"}, {key: "no-retries", text: "flag \"--no-retries\" help=\"Disable automatic retries (default: retries enabled with exponential backoff)\" global=#true config=\"no_retries\" default=#false hide=#true", hidden: true}, {key: "retry-max-elapsed-time", text: "flag \"--retry-max-elapsed-time \" help=\"Maximum total time for retries (e.g., 30s, 5m). Default: 30s\" global=#true config=\"retry_max_elapsed_time\" hide=#true", hidden: true}, {key: "retry-connection-errors", text: "flag \"--retry-connection-errors\" help=\"Retry on connection errors (EOF, reset, etc.)\" global=#true config=\"retry_connection_errors\" default=#false hide=#true", hidden: true}, {key: "retry-config", text: "flag \"--retry-config \" help=\"Full retry config as JSON. Schema: {\\\"strategy\\\":\\\"backoff\\\",\\\"backoff\\\":{\\\"initialInterval\\\":500,\\\"maxInterval\\\":10000,\\\"exponent\\\":1.5,\\\"maxElapsedTime\\\":30000},\\\"retryConnectionErrors\\\":false}. Use strategy \\\"attempt-count-backoff\\\" with maxRetries for attempt-count retries. Times are in milliseconds.\" global=#true config=\"retry_config\" hide=#true", hidden: true}, {key: "api-key", text: "flag \"--api-key \" help=\"Gemini API key sent as x-goog-api-key.\" global=#true env=\"GEMINI_API_KEY\" config=\"security.api_key\""}, {key: "access-token", text: "flag \"--access-token \" help=\"OAuth access token sent as a bearer Authorization header.\" global=#true env=\"GEMINI_ACCESS_TOKEN\" config=\"security.access_token\""}, {key: "no-keyring", text: "flag \"--no-keyring\" help=\"Never read or write the OS keychain; store secrets in the config file instead\" global=#true env=\"GEMINI_NO_KEYRING\" config=\"no_keyring\" default=#false"}, {key: "api-version", text: "flag \"--api-version \" help=\"Which version of the API to use\" global=#true env=\"GEMINI_API_VERSION\" config=\"globals.api_version\" default=\"v1beta\""}, {key: "api-revision", text: "flag \"--api-revision \" help=\"Interactions API revision to request\" global=#true env=\"GEMINI_API_REVISION\" config=\"globals.api_revision\""}, {key: "user-project", text: "flag \"--user-project \" help=\"Quota project header to send with Google GenAI API requests\" global=#true env=\"GEMINI_USER_PROJECT\" config=\"globals.user_project\""}}, children: []string{"agent", "analyze", "auth", "configure", "credentials", "environments", "files", "generate", "image", "models", "music", "transcribe", "triggers", "tts", "video", "webhooks", "whoami", "completion", "explore", "help", "version"}}, + "": {head: "name \"gemini-api\"\nbin \"gemini-api\"\nabout \"\"\"\n Gemini API: Use the Gemini Interactions API and managed-agent platform from the command line.\n\n Get started:\n Set GEMINI_API_KEY, or run: gemini-api configure\n Then run a model or managed agent: gemini-api agent --help\n Add --dry-run to preview any API call without sending it.\n \"\"\"\nversion \"0.4.5\"\nconfig {\n file \"~/.config/gemini-api/config.yaml\"\n}", flags: []usageItem{{key: "usage", text: "flag \"--usage\" help=\"Print the CLI Usage schema in KDL format\" global=#true"}, {key: "help-global", text: "flag \"--help-global\" help=\"Print global flags shared by every command\""}, {key: "version", text: "flag \"-v --version\" help=\"Print the CLI version\""}, {key: "output-format", text: "flag \"-o --output-format \" help=\"Specify the output format. Options: pretty, json, yaml, table, toon.\" global=#true config=\"output_format\" default=\"pretty\""}, {key: "color", text: "flag \"--color \" help=\"Control colored output: auto (color when output is a TTY), always, or never. Respects NO_COLOR and FORCE_COLOR env vars.\" global=#true default=\"auto\""}, {key: "jq", text: "flag \"-q --jq \" help=\"Filter and transform output using a jq expression (e.g., '.name', '.items[] | .id')\" global=#true"}, {key: "raw-output", text: "flag \"--raw-output\" help=\"Write --jq string results as raw text instead of JSON strings (like jq -r); non-string results stay JSON\" global=#true default=#true"}, {key: "server-url", text: "flag \"--server-url \" help=\"Override the default server URL\" global=#true"}, {key: "header", text: "flag \"-H --header \" help=\"Set a custom HTTP request header (format: \\\"Key: Value\\\"). Can be specified multiple times.\" global=#true var=#true"}, {key: "include-headers", text: "flag \"--include-headers\" help=\"Include HTTP response headers in the output\" global=#true default=#false"}, {key: "timeout", text: "flag \"--timeout \" help=\"HTTP request timeout (e.g., 30s, 5m, 100ms)\" global=#true config=\"timeout\""}, {key: "interactive", text: "flag \"--interactive\" help=\"Prompt for missing inputs and open guided configure/auth forms (forms fall back to line prompts on stdin off-TTY)\" global=#true default=#false"}, {key: "no-interactive", text: "flag \"--no-interactive\" help=\"Disable all interactive features (auto-prompting, explorer auto-launch, TUI forms)\" global=#true default=#false"}, {key: "dry-run", text: "flag \"--dry-run\" help=\"Preview API requests without sending them (no network, no OS keychain). Human preview on stderr; with -o json or --jq, one JSON object per request on stdout. Local mutation commands (auth login, auth logout and configure) make no request: they skip prompts and writes and report a no-op (stderr, or one JSON object on stdout in the machine form)\" global=#true default=#false"}, {key: "debug", text: "flag \"-d --debug\" help=\"Log request and response diagnostics to stderr\" global=#true default=#false"}, {key: "agent-mode", text: "flag \"--agent-mode\" help=\"Enable structured errors and default TOON output for AI coding agents.\" global=#true default=#false"}, {key: "no-retries", text: "flag \"--no-retries\" help=\"Disable automatic retries (default: retries enabled with exponential backoff)\" global=#true config=\"no_retries\" default=#false hide=#true", hidden: true}, {key: "retry-max-elapsed-time", text: "flag \"--retry-max-elapsed-time \" help=\"Maximum total time for retries (e.g., 30s, 5m). Default: 30s\" global=#true config=\"retry_max_elapsed_time\" hide=#true", hidden: true}, {key: "retry-connection-errors", text: "flag \"--retry-connection-errors\" help=\"Retry on connection errors (EOF, reset, etc.)\" global=#true config=\"retry_connection_errors\" default=#false hide=#true", hidden: true}, {key: "retry-config", text: "flag \"--retry-config \" help=\"Full retry config as JSON. Schema: {\\\"strategy\\\":\\\"backoff\\\",\\\"backoff\\\":{\\\"initialInterval\\\":500,\\\"maxInterval\\\":10000,\\\"exponent\\\":1.5,\\\"maxElapsedTime\\\":30000},\\\"retryConnectionErrors\\\":false}. Use strategy \\\"attempt-count-backoff\\\" with maxRetries for attempt-count retries. Times are in milliseconds.\" global=#true config=\"retry_config\" hide=#true", hidden: true}, {key: "api-key", text: "flag \"--api-key \" help=\"Gemini API key sent as x-goog-api-key.\" global=#true env=\"GEMINI_API_KEY\" config=\"security.api_key\""}, {key: "access-token", text: "flag \"--access-token \" help=\"OAuth access token sent as a bearer Authorization header.\" global=#true env=\"GEMINI_ACCESS_TOKEN\" config=\"security.access_token\""}, {key: "no-keyring", text: "flag \"--no-keyring\" help=\"Never read or write the OS keychain; store secrets in the config file instead\" global=#true env=\"GEMINI_NO_KEYRING\" config=\"no_keyring\" default=#false"}, {key: "api-version", text: "flag \"--api-version \" help=\"Which version of the API to use\" global=#true env=\"GEMINI_API_VERSION\" config=\"globals.api_version\" default=\"v1\""}, {key: "api-revision", text: "flag \"--api-revision \" help=\"Interactions API revision to request\" global=#true env=\"GEMINI_API_REVISION\" config=\"globals.api_revision\""}, {key: "user-project", text: "flag \"--user-project \" help=\"Quota project header to send with Google GenAI API requests\" global=#true env=\"GEMINI_USER_PROJECT\" config=\"globals.user_project\""}}, children: []string{"agent", "analyze", "auth", "configure", "credentials", "environments", "files", "generate", "image", "models", "music", "transcribe", "triggers", "tts", "video", "webhooks", "whoami", "completion", "explore", "help", "version"}}, "agent": {head: "cmd \"agent\" help=\"Run interactions with Gemini models or managed agents, and manage agent definitions\"", children: []string{"run", "cancel", "create", "delete", "delete-interaction", "get", "list", "status"}}, "agent run": {head: "cmd \"run\" help=\"Run an interaction with a Gemini model or a managed agent\"", args: []usageItem{{key: "input", text: " arg \"input\" help=\"Prompt or task to send\" required=#true var=#true"}}, flags: []usageItem{{key: "body", text: " flag \"--body \" help=\"Request body as JSON (advanced; merges with intent inputs, rejecting duplicate keys). Can also be provided via stdin; @path reads a file, @- reads stdin to EOF. Use --schema to print the exact JSON Schema.\""}, {key: "schema", text: " flag \"--schema\" help=\"Print the exact JSON Schema of the request body and exit\""}, {key: "agent", text: " flag \"--agent \" help=\"Managed agent to run (see \\\"gemini-api agent list\\\") (e.g. deep-research-pro-preview-12-2025, deep-research-preview-04-2026, deep-research-max-preview-04-2026, antigravity-preview-05-2026)\" {\n suggestions \"deep-research-pro-preview-12-2025\" \"deep-research-preview-04-2026\" \"deep-research-max-preview-04-2026\" \"antigravity-preview-05-2026\"\n }"}, {key: "background", text: " flag \"--background\" help=\"Return immediately with an interaction ID; poll with \\\"gemini-api agent status\\\"\""}, {key: "model", text: " flag \"-m --model \" help=\"Model to run (see \\\"gemini-api models\\\") (e.g. gemma-4-26b-a4b-it, gemma-4-31b-it, gemini-flash-latest, gemini-flash-lite-latest, ..., default: gemini-3.8-flash)\" default=\"gemini-3.8-flash\" {\n suggestions \"gemma-4-26b-a4b-it\" \"gemma-4-31b-it\" \"gemini-flash-latest\" \"gemini-flash-lite-latest\" \"gemini-pro-latest\" \"gemini-2.5-flash\" \"gemini-2.5-pro\" \"gemini-2.5-flash-lite\" \"gemini-3.5-flash-lite\" \"gemini-2.5-flash-image\" \"gemini-3-flash-preview\" \"gemini-3.1-pro-preview\" \"gemini-3.1-pro-preview-customtools\" \"gemini-3.1-flash-lite\" \"gemini-3.1-flash-lite-image\" \"gemini-3-pro-image\" \"nano-banana-pro-preview\" \"gemini-3.1-flash-image\" \"gemini-nano-banana-2.1\" \"gemini-3.1-flash-tts-preview\" \"gemini-3.5-flash\" \"gemini-3.6-flash\" \"gemini-3.7-flash\" \"gemini-3.8-flash\" \"gemini-4-argon\" \"gemini-3.8-flash-tts\" \"gemini-3.8-flash-lite-tts\" \"gemini-3.5-transcribe\" \"lyria-3-clip-preview\" \"lyria-3-pro-preview\" \"gemini-robotics-er-1.6-preview\" \"gemini-robotics-er-2-preview\" \"lyria-3.5\" \"gemini-omni-1.1-flash\" \"gemini-omni-flash-preview\"\n }"}, {key: "previous-interaction-id", text: " flag \"--previous-interaction-id \" help=\"Continue from an earlier interaction by passing its interaction ID\""}, {key: "stream", text: " flag \"--stream\" help=\"Stream the reply as it is generated; use --stream=false for one complete interaction (default: true)\" default=#true"}}}, "agent cancel": {head: "cmd \"cancel\" help=\"Cancel an in-progress interaction by interaction ID\"", args: []usageItem{{key: "id", text: " arg \"id\" help=\"Required. The name of the interaction to cancel. (or use --id)\""}}, flags: []usageItem{{key: "id", text: " flag \"-i --id \" help=\"Required. The name of the interaction to cancel. (or pass it as the [id] argument)\""}}}, @@ -58,7 +58,7 @@ var usageNodes = map[string]usageNode{ "auth login": {head: "cmd \"login\" help=\"Interactively configure authentication credentials\"", flags: []usageItem{{key: "api-key", text: " flag \"--api-key \" help=\"Gemini API key sent as x-goog-api-key.\" env=\"GEMINI_API_KEY\" config=\"security.api_key\"", settings: true}, {key: "access-token", text: " flag \"--access-token \" help=\"OAuth access token sent as a bearer Authorization header.\" env=\"GEMINI_ACCESS_TOKEN\" config=\"security.access_token\"", settings: true}}}, "auth logout": {head: "cmd \"logout\" help=\"Clear all stored authentication credentials\""}, "auth whoami": {head: "cmd \"whoami\" help=\"Display current authentication and global parameter configuration\""}, - "configure": {head: "cmd \"configure\" help=\"Configure authentication, global parameters, and preferences\"", flags: []usageItem{{key: "default-output-format", text: " flag \"--default-output-format \" help=\"Store the default output format without opening the form. Options: pretty, json, yaml, table, toon. Pass an empty value to clear it.\" {\n suggestions \"pretty\" \"json\" \"yaml\" \"table\" \"toon\"\n }"}, {key: "api-key", text: " flag \"--api-key \" help=\"Gemini API key sent as x-goog-api-key.\" env=\"GEMINI_API_KEY\" config=\"security.api_key\"", settings: true}, {key: "access-token", text: " flag \"--access-token \" help=\"OAuth access token sent as a bearer Authorization header.\" env=\"GEMINI_ACCESS_TOKEN\" config=\"security.access_token\"", settings: true}, {key: "api-version", text: " flag \"--api-version \" help=\"Which version of the API to use\" env=\"GEMINI_API_VERSION\" config=\"globals.api_version\" default=\"v1beta\"", settings: true}, {key: "api-revision", text: " flag \"--api-revision \" help=\"Interactions API revision to request\" env=\"GEMINI_API_REVISION\" config=\"globals.api_revision\"", settings: true}, {key: "user-project", text: " flag \"--user-project \" help=\"Quota project header to send with Google GenAI API requests\" env=\"GEMINI_USER_PROJECT\" config=\"globals.user_project\"", settings: true}}}, + "configure": {head: "cmd \"configure\" help=\"Configure authentication, global parameters, and preferences\"", flags: []usageItem{{key: "default-output-format", text: " flag \"--default-output-format \" help=\"Store the default output format without opening the form. Options: pretty, json, yaml, table, toon. Pass an empty value to clear it.\" {\n suggestions \"pretty\" \"json\" \"yaml\" \"table\" \"toon\"\n }"}, {key: "api-key", text: " flag \"--api-key \" help=\"Gemini API key sent as x-goog-api-key.\" env=\"GEMINI_API_KEY\" config=\"security.api_key\"", settings: true}, {key: "access-token", text: " flag \"--access-token \" help=\"OAuth access token sent as a bearer Authorization header.\" env=\"GEMINI_ACCESS_TOKEN\" config=\"security.access_token\"", settings: true}, {key: "api-version", text: " flag \"--api-version \" help=\"Which version of the API to use\" env=\"GEMINI_API_VERSION\" config=\"globals.api_version\" default=\"v1\"", settings: true}, {key: "api-revision", text: " flag \"--api-revision \" help=\"Interactions API revision to request\" env=\"GEMINI_API_REVISION\" config=\"globals.api_revision\"", settings: true}, {key: "user-project", text: " flag \"--user-project \" help=\"Quota project header to send with Google GenAI API requests\" env=\"GEMINI_USER_PROJECT\" config=\"globals.user_project\"", settings: true}}}, "credentials": {head: "cmd \"credentials\" help=\"Manage stored credentials (bearer tokens, OAuth2, environment variables) that agents inject into outgoing HTTP requests\"", children: []string{"create", "delete", "get", "list", "update"}}, "credentials create": {head: "cmd \"create\" help=\"Create a credential\"", flags: []usageItem{{key: "body-param", text: " flag \"-b --body-param \" help=\"{ \\\"id\\\": string, \\\"injection_location\\\": string | string[], \\\"value\\\": string, ... } | { \\\"id\\\": string, \\\"token\\\": string, ... } | { \\\"client_id\\\": string, \\\"client_secret\\\": string, \\\"id\\\": string, \\\"refresh_token\\\": string, ... }\""}, {key: "body-param.environment-variable", text: " flag \"--body-param.environment-variable \" help=\"EnvironmentVariableConfig variant as JSON\""}, {key: "body-param.bearer-token", text: " flag \"--body-param.bearer-token \" help=\"HttpBearerConfig variant as JSON\""}, {key: "body-param.bearer-token.header-name", text: " flag \"--body-param.bearer-token.header-name \" help=\"\"\"\n Optional. Header name to inject the token into. Defaults to\n 'Authorization'.\n \"\"\""}, {key: "body-param.bearer-token.id", text: " flag \"--body-param.bearer-token.id \" help=\"Required. Unique identifier for the credential. [required]\""}, {key: "body-param.bearer-token.prefix", text: " flag \"--body-param.bearer-token.prefix \" help=\"\"\"\n Optional. Prefix to prepend to the token. Defaults to 'Bearer'. Set to ''\n for no prefix.\n \"\"\""}, {key: "body-param.bearer-token.token", text: " flag \"--body-param.bearer-token.token \" help=\"Required. Input only. The static bearer token. Write-only; never returned in responses. [required]\""}, {key: "body-param.oauth2", text: " flag \"--body-param.oauth2 \" help=\"OAuth2Config variant as JSON\""}, {key: "body", text: " flag \"--body \" help=\"Request body as JSON (alternative to individual flags). Can also be provided via stdin; @path reads a file, @- reads stdin to EOF. Use --schema to print the exact JSON Schema.\""}, {key: "schema", text: " flag \"--schema\" help=\"Print the exact JSON Schema of the request body and exit\""}}}, "credentials delete": {head: "cmd \"delete\" help=\"Delete a credential by ID\"", args: []usageItem{{key: "id", text: " arg \"id\" help=\"Credential ID, as given on create (or use --id)\""}}, flags: []usageItem{{key: "id", text: " flag \"-i --id \" help=\"Credential ID, as given on create (or pass it as the [id] argument)\""}}}, diff --git a/tests/contract/cli_contract_test.go b/tests/contract/cli_contract_test.go index 71731a6..12571ad 100644 --- a/tests/contract/cli_contract_test.go +++ b/tests/contract/cli_contract_test.go @@ -1415,9 +1415,9 @@ func TestDebugRedactsGeminiAPIKey(t *testing.T) { } } -// TestAPIVersionDefaultsToV1Beta pins the zero-config path: with no -// --api-version flag, env var, or config entry, requests go to /v1beta. -func TestAPIVersionDefaultsToV1Beta(t *testing.T) { +// TestAPIVersionDefaultsToV1 pins the zero-config path: with no +// --api-version flag, env var, or config entry, requests go to /v1. +func TestAPIVersionDefaultsToV1(t *testing.T) { paths := make(chan string, 1) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { paths <- r.URL.Path @@ -1438,8 +1438,8 @@ func TestAPIVersionDefaultsToV1Beta(t *testing.T) { if result.err != nil { t.Fatalf("agent list failed without an explicit API version: %v\nstderr: %s", result.err, result.stderr) } - if got := <-paths; !strings.HasPrefix(got, "/v1beta/") { - t.Errorf("request path = %q, want /v1beta/ prefix from the schema default", got) + if got := <-paths; !strings.HasPrefix(got, "/v1/") { + t.Errorf("request path = %q, want /v1/ prefix from the schema default", got) } } diff --git a/tests/contract/porcelain_interactive_test.go b/tests/contract/porcelain_interactive_test.go index f03cdd2..2fd369e 100644 --- a/tests/contract/porcelain_interactive_test.go +++ b/tests/contract/porcelain_interactive_test.go @@ -136,7 +136,7 @@ func TestPorcelainInteractivePrompts(t *testing.T) { command: []string{"files", "upload"}, answers: map[string][]string{"arg:path": {upload}}, wantFields: []string{"arg:path"}, - wantStderr: []string{"upload/v1beta/files", "dry-run-session", "