mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-10 16:08:16 -05:00
fix: reinitialize required slice if nil (#571)
`slices.Concat` will return `nil` if arrays are all empty instead of an empty slice `[]`. Fix this by setting `[]` if it's `nil`. Fixes #564
This commit is contained in:
@@ -112,6 +112,9 @@ func (cfg Config) Initialize(srcs map[string]sources.Source) (tools.Tool, error)
|
||||
bodyMcpManifest.Required,
|
||||
headerMcpManifest.Required,
|
||||
)
|
||||
if concatRequiredManifest == nil {
|
||||
concatRequiredManifest = []string{}
|
||||
}
|
||||
|
||||
// Concatenate parameters for MCP `properties` field
|
||||
concatPropertiesManifest := make(map[string]tools.ParameterMcpManifest)
|
||||
|
||||
Reference in New Issue
Block a user