Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Nested Function Calls don't work with the Realtime Model

I'm trying to use function calls with nested definitions with the realtime model (gemini-2.0-flash-exp), but gemini returns an internal server error for such function calls.

sahil273_0-1741629741232.png

I've attached a simple tool to reproduce the error

 

[
  {
    "name": "add_numbers",
    "description": "adds two numbers",
    "parameters": {
      "type": "object",
      "description": "add number input",
      "properties": {
        "both_numbers": {
          "type": "object",
          "properties": {
            "first_number": {
              "type": "integer",
              "description": "The first number to add"
            },
            "second_number": {
              "type": "integer",
              "description": "The second number to add"
            }
          }
        }
      }
    }
  }
]

 


Is there a workaround to this? I have a few complex tools where nesting is absolutely required.

0 0 50
0 REPLIES 0