Compare commits

..

3 Commits

Author SHA1 Message Date
Yuan Teoh
43304e9999 docs: update cloudsqlrestorebackup docs with new config format 2026-01-28 13:03:33 -08:00
dishaprakash
341316bb63 chore: Update Version String (#2380)
## Description

This PR modifies the User Agent (version string) generation to better
accommodate the recent support for combining prebuilt and custom tools.

The design for this update is as so:
Single Prebuilt: <version+metadata>+prebuilt.bigquery
Multiple prebuilt: <version+metadata>+prebuilt.bigquery+prebuilt.alloydb
Prebuilt + Custom:  <version+metadata>+custom.bigquery
Multiple prebuilt + custom:
<version+metadata>+custom.bigquery+custom.alloydb

Versioning Logic:
- Single Prebuilt: Appends +prebuilt.<name>
  Example: ```<version>+prebuilt.bigquery```

- Multiple Prebuilt: Appends a tag for each prebuilt config.
  Example: ```<version>+prebuilt.bigquery+prebuilt.alloydb```

- Prebuilt + Custom: If custom tools are detected, the tag for all
prebuilt tools switches to custom.
  Example: ```<version>+custom.bigquery```

- Multiple Prebuilt + Custom: All prebuilt tools receive the custom tag.
  Example: ```<version>+custom.bigquery+custom.alloydb```

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>
2026-01-28 18:00:39 +00:00
Averi Kitsch
44da09300c docs: remove non-prod header (#2376)
## Description

> Should include a concise description of the changes (bug or feature),
it's
> impact, along with a summary of the solution

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [ ] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change

🛠️ Fixes #<issue_number_goes_here>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-28 09:37:32 -08:00
4 changed files with 21 additions and 12 deletions

View File

@@ -107,7 +107,7 @@ redeploying your application.
## Getting Started
### (Non-production) Running Toolbox
### Quickstart: Running Toolbox using NPX
You can run Toolbox directly with a [configuration file](#configuration):

View File

@@ -997,9 +997,6 @@ func run(cmd *Command) error {
return err
}
// Update version string
cmd.cfg.Version += "+prebuilt." + configName
// Parse into ToolsFile struct
parsed, err := parseToolsFile(ctx, buf)
if err != nil {
@@ -1066,6 +1063,18 @@ func run(cmd *Command) error {
allToolsFiles = append(allToolsFiles, customTools)
}
// Modify version string based on loaded configurations
if len(cmd.prebuiltConfigs) > 0 {
tag := "prebuilt"
if isCustomConfigured {
tag = "custom"
}
// cmd.prebuiltConfigs is already sorted above
for _, configName := range cmd.prebuiltConfigs {
cmd.cfg.Version += fmt.Sprintf("+%s.%s", tag, configName)
}
}
// Merge Everything
// This will error if custom tools collide with prebuilt tools
finalToolsFile, err := mergeToolsFiles(allToolsFiles...)

View File

@@ -77,7 +77,7 @@ redeploying your application.
## Getting Started
### (Non-production) Running Toolbox
### Quickstart: Running Toolbox using NPX
You can run Toolbox directly with a [configuration file](../configure.md):

View File

@@ -8,7 +8,7 @@ description: "Restores a backup of a Cloud SQL instance."
The `cloud-sql-restore-backup` tool restores a backup on a Cloud SQL instance using the Cloud SQL Admin API.
{{< notice info dd>}}
This tool uses a `source` of kind `cloud-sql-admin`.
This tool uses a `source` of type `cloud-sql-admin`.
{{< /notice >}}
## Examples
@@ -16,11 +16,11 @@ This tool uses a `source` of kind `cloud-sql-admin`.
Basic backup restore
```yaml
tools:
backup-restore-basic:
kind: cloud-sql-restore-backup
source: cloud-sql-admin-source
description: "Restores a backup onto the given Cloud SQL instance."
kind: tools
name: backup-restore-basic
type: cloud-sql-restore-backup
source: cloud-sql-admin-source
description: "Restores a backup onto the given Cloud SQL instance."
```
## Reference
@@ -28,7 +28,7 @@ tools:
### Tool Configuration
| **field** | **type** | **required** | **description** |
| -------------- | :------: | :----------: | ------------------------------------------------ |
| kind | string | true | Must be "cloud-sql-restore-backup". |
| type | string | true | Must be "cloud-sql-restore-backup". |
| source | string | true | The name of the `cloud-sql-admin` source to use. |
| description | string | false | A description of the tool. |