{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/archestra/main/json-schema/archestra-gemini-generate-content-request-input-schema.json",
  "title": "GeminiGenerateContentRequestInput",
  "x-generated": "2026-10-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/archestra-openapi.json#/components/schemas/GeminiGenerateContentRequestInput",
  "type": "object",
  "properties": {
    "contents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "description": "The role of the author of this content."
          },
          "parts": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "text"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "inlineData": {
                          "type": "object",
                          "properties": {
                            "mimeType": {
                              "type": "string"
                            },
                            "data": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "data"
                          ]
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "inlineData"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "functionCall": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "args": {
                              "type": "object",
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "name"
                          ]
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "functionCall"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "functionResponse": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "response": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "willContinue": {
                              "type": "boolean"
                            },
                            "scheduling": {
                              "type": "string",
                              "enum": [
                                "SCHEDULING_UNSPECIFIED",
                                "SILENT",
                                "WHEN_IDLE",
                                "INTERRUPT"
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "response"
                          ]
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "functionResponse"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "fileData": {
                          "type": "object",
                          "properties": {
                            "mimeType": {
                              "type": "string"
                            },
                            "fileUri": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "fileUri"
                          ]
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "fileData"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "language": {
                          "type": "string",
                          "enum": [
                            "LANGUAGE_UNSPECIFIED",
                            "PYTHON"
                          ]
                        },
                        "executableCode": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code"
                          ]
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "language",
                        "executableCode"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "thought": {
                          "description": "Indicates if the part is thought from the model",
                          "type": "boolean"
                        },
                        "thoughtSignature": {
                          "description": "An opaque signature for the thought so it can be reused in subsequent requests. A base64-encoded string",
                          "type": "string"
                        },
                        "codeExecutionResult": {
                          "type": "object",
                          "properties": {
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "OUTCOME_UNSPECIFIED",
                                "OUTCOME_OK",
                                "OUTCOME_FAILED",
                                "OUTCOME_DEADLINE_EXCEEDED"
                              ],
                              "description": "Outcome of the code execution."
                            },
                            "output": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "outcome"
                          ]
                        },
                        "metadata": {
                          "description": "https://ai.google.dev/api/caching#PartMetadata",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "startOffset": {
                                  "description": "The start offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "endOffset": {
                                  "description": "The end offset of the video. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'",
                                  "type": "string"
                                },
                                "fps": {
                                  "description": "The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]",
                                  "type": "number"
                                }
                              },
                              "description": "https://ai.google.dev/api/caching#VideoMetadata"
                            }
                          ]
                        }
                      },
                      "required": [
                        "codeExecutionResult"
                      ]
                    }
                  ]
                }
              ],
              "description": "https://ai.google.dev/api/caching#Part"
            }
          }
        },
        "required": [
          "role",
          "parts"
        ],
        "description": "\nThe base structured datatype containing multi-part content of a message.\n\nA Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.\n\nhttps://ai.google.dev/api/caching#Content\n"
      },
      "description": "The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like chat, this is a repeated field that contains the conversation history and the latest request"
    },
    "tools": {
      "description": "A list of Tools the Model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the Model. Supported Tools are Function and codeExecution. Refer to the Function calling and the Code execution guides to learn more.",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "functionDeclarations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."
                    },
                    "description": {
                      "type": "string",
                      "description": "A brief description of the function."
                    },
                    "behavior": {
                      "description": "https://ai.google.dev/api/caching#Behavior",
                      "type": "string",
                      "enum": [
                        "UNSPECIFIED",
                        "BLOCKING",
                        "NON_BLOCKING"
                      ]
                    },
                    "parameters": {
                      "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "parametersJsonSchema": {},
                    "response": {},
                    "responseJsonSchema": {}
                  },
                  "required": [
                    "name",
                    "description"
                  ],
                  "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                }
              },
              "googleSearchRetrieval": {
                "type": "object",
                "properties": {
                  "dynamicRetrievalConfig": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "MODE_UNSPECIFIED",
                          "MODE_DYNAMIC"
                        ],
                        "description": "https://ai.google.dev/api/caching#Mode"
                      },
                      "dynamicThreshold": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "mode",
                      "dynamicThreshold"
                    ],
                    "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                  }
                },
                "required": [
                  "dynamicRetrievalConfig"
                ],
                "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
              },
              "codeExecution": {},
              "googleSearch": {},
              "urlContext": {},
              "googleMaps": {},
              "enterpriseWebSearch": {},
              "fileSearch": {}
            },
            "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
          }
        },
        {
          "type": "object",
          "properties": {
            "functionDeclarations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."
                  },
                  "description": {
                    "type": "string",
                    "description": "A brief description of the function."
                  },
                  "behavior": {
                    "description": "https://ai.google.dev/api/caching#Behavior",
                    "type": "string",
                    "enum": [
                      "UNSPECIFIED",
                      "BLOCKING",
                      "NON_BLOCKING"
                    ]
                  },
                  "parameters": {
                    "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "parametersJsonSchema": {},
                  "response": {},
                  "responseJsonSchema": {}
                },
                "required": [
                  "name",
                  "description"
                ],
                "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
              }
            },
            "googleSearchRetrieval": {
              "type": "object",
              "properties": {
                "dynamicRetrievalConfig": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "MODE_UNSPECIFIED",
                        "MODE_DYNAMIC"
                      ],
                      "description": "https://ai.google.dev/api/caching#Mode"
                    },
                    "dynamicThreshold": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "mode",
                    "dynamicThreshold"
                  ],
                  "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                }
              },
              "required": [
                "dynamicRetrievalConfig"
              ],
              "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
            },
            "codeExecution": {},
            "googleSearch": {},
            "urlContext": {},
            "googleMaps": {},
            "enterpriseWebSearch": {},
            "fileSearch": {}
          },
          "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
        }
      ]
    },
    "toolConfig": {
      "description": "Tool configuration for any Tool specified in the request.",
      "type": "object",
      "properties": {
        "functionCallingConfig": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "AUTO",
                "ANY",
                "NONE"
              ]
            },
            "allowedFunctionNames": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "mode"
          ]
        }
      },
      "required": [
        "functionCallingConfig"
      ]
    },
    "safetySettings": {
      "description": "A list of unique SafetySetting instances for blocking unsafe content.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "HARM_CATEGORY_UNSPECIFIED",
              "HARM_CATEGORY_DEROGATORY",
              "HARM_CATEGORY_TOXICITY",
              "HARM_CATEGORY_VIOLENCE",
              "HARM_CATEGORY_SEXUAL",
              "HARM_CATEGORY_MEDICAL",
              "HARM_CATEGORY_DANGEROUS",
              "HARM_CATEGORY_HARASSMENT",
              "HARM_CATEGORY_HATE_SPEECH",
              "HARM_CATEGORY_SEXUALLY_EXPLICIT",
              "HARM_CATEGORY_DANGEROUS_CONTENT",
              "HARM_CATEGORY_CIVIC_INTEGRITY"
            ],
            "description": "\n  The category for this setting\n\n  https://ai.google.dev/api/generate-content#v1beta.HarmCategory\n"
          },
          "threshold": {
            "type": "string",
            "enum": [
              "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
              "BLOCK_LOW_AND_ABOVE",
              "BLOCK_MEDIUM_AND_ABOVE",
              "BLOCK_ONLY_HIGH",
              "BLOCK_NONE",
              "OFF"
            ],
            "description": "\n      Controls the probability threshold at which harm is blocked.\n\n      https://ai.google.dev/api/generate-content#HarmBlockThreshold\n      "
          }
        },
        "required": [
          "category",
          "threshold"
        ],
        "description": "https://ai.google.dev/api/generate-content#v1beta.SafetySetting"
      }
    },
    "systemInstruction": {
      "type": "object",
      "properties": {
        "parts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              }
            },
            "required": [
              "text"
            ]
          }
        }
      },
      "required": [
        "parts"
      ],
      "description": "Developer set system instruction(s). Currently, text only."
    },
    "generationConfig": {
      "type": "object",
      "properties": {
        "stopSequences": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "responseMimeType": {
          "type": "string"
        },
        "responseSchema": {},
        "_responseJsonSchema": {},
        "responseJsonSchema": {},
        "responseModalities": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "MODALITY_UNSPECIFIED",
              "TEXT",
              "IMAGE",
              "AUDIO"
            ],
            "description": "https://ai.google.dev/api/generate-content#Modality"
          }
        },
        "candidateCount": {
          "type": "number"
        },
        "maxOutputTokens": {
          "type": "number"
        },
        "temperature": {
          "type": "number"
        },
        "topP": {
          "type": "number"
        },
        "topK": {
          "type": "number"
        },
        "seed": {
          "type": "number"
        },
        "presencePenalty": {
          "type": "number"
        },
        "frequencyPenalty": {
          "type": "number"
        },
        "responseLogprobs": {
          "type": "boolean"
        },
        "logProbs": {
          "type": "number"
        },
        "enableEnhancedCivicAnswers": {
          "type": "boolean"
        },
        "speechConfig": {},
        "thinkingConfig": {},
        "imageConfig": {},
        "mediaResolution": {
          "description": "https://ai.google.dev/api/generate-content#MediaResolution",
          "type": "string",
          "enum": [
            "MEDIA_RESOLUTION_UNSPECIFIED",
            "MEDIA_RESOLUTION_LOW",
            "MEDIA_RESOLUTION_MEDIUM",
            "MEDIA_RESOLUTION_HIGH"
          ]
        }
      },
      "description": "https://ai.google.dev/api/generate-content#v1beta.GenerationConfig"
    },
    "cachedContent": {
      "description": "The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}",
      "type": "string"
    },
    "config": {
      "type": "object",
      "properties": {
        "tools": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "functionDeclarations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."
                        },
                        "description": {
                          "type": "string",
                          "description": "A brief description of the function."
                        },
                        "behavior": {
                          "description": "https://ai.google.dev/api/caching#Behavior",
                          "type": "string",
                          "enum": [
                            "UNSPECIFIED",
                            "BLOCKING",
                            "NON_BLOCKING"
                          ]
                        },
                        "parameters": {
                          "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "parametersJsonSchema": {},
                        "response": {},
                        "responseJsonSchema": {}
                      },
                      "required": [
                        "name",
                        "description"
                      ],
                      "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                    }
                  },
                  "googleSearchRetrieval": {
                    "type": "object",
                    "properties": {
                      "dynamicRetrievalConfig": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "MODE_UNSPECIFIED",
                              "MODE_DYNAMIC"
                            ],
                            "description": "https://ai.google.dev/api/caching#Mode"
                          },
                          "dynamicThreshold": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "mode",
                          "dynamicThreshold"
                        ],
                        "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                      }
                    },
                    "required": [
                      "dynamicRetrievalConfig"
                    ],
                    "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                  },
                  "codeExecution": {},
                  "googleSearch": {},
                  "urlContext": {},
                  "googleMaps": {},
                  "enterpriseWebSearch": {},
                  "fileSearch": {}
                },
                "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
              }
            },
            {
              "type": "object",
              "properties": {
                "functionDeclarations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The name of the function. Must start with a letter or underscore and contain only a-z, A-Z, 0-9, underscores, dots, colons, or dashes, with a maximum length of 128."
                      },
                      "description": {
                        "type": "string",
                        "description": "A brief description of the function."
                      },
                      "behavior": {
                        "description": "https://ai.google.dev/api/caching#Behavior",
                        "type": "string",
                        "enum": [
                          "UNSPECIFIED",
                          "BLOCKING",
                          "NON_BLOCKING"
                        ]
                      },
                      "parameters": {
                        "description": "Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.",
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "parametersJsonSchema": {},
                      "response": {},
                      "responseJsonSchema": {}
                    },
                    "required": [
                      "name",
                      "description"
                    ],
                    "description": "https://ai.google.dev/api/caching#FunctionDeclaration"
                  }
                },
                "googleSearchRetrieval": {
                  "type": "object",
                  "properties": {
                    "dynamicRetrievalConfig": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "MODE_UNSPECIFIED",
                            "MODE_DYNAMIC"
                          ],
                          "description": "https://ai.google.dev/api/caching#Mode"
                        },
                        "dynamicThreshold": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "mode",
                        "dynamicThreshold"
                      ],
                      "description": "\n        Specifies the dynamic retrieval configuration for the given source.\n\n        https://ai.google.dev/api/caching#DynamicRetrievalConfig\n      "
                    }
                  },
                  "required": [
                    "dynamicRetrievalConfig"
                  ],
                  "description": "https://ai.google.dev/api/caching#GoogleSearchRetrieval"
                },
                "codeExecution": {},
                "googleSearch": {},
                "urlContext": {},
                "googleMaps": {},
                "enterpriseWebSearch": {},
                "fileSearch": {}
              },
              "description": "\nTool details that the model may use to generate response.\n\nA Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.\n\nhttps://ai.google.dev/api/caching#Tool\n"
            }
          ]
        },
        "toolConfig": {
          "description": "Tool configuration for any Tool specified in the request.",
          "type": "object",
          "properties": {
            "functionCallingConfig": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "AUTO",
                    "ANY",
                    "NONE"
                  ]
                },
                "allowedFunctionNames": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "mode"
              ]
            }
          },
          "required": [
            "functionCallingConfig"
          ]
        }
      }
    }
  },
  "required": [
    "contents"
  ]
}