Nested Function Calls don't work

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.

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.

That is code execution; you can test function calls in a normal text model, but live, I don’t know.

No, this is not code execution. This is how the live model handles function calls (even when they work).
Look at the following screenshot

Function calls don’t seem to work in the live environment because the function must be defined on the server; if the function is not on the server, it will return an error.

Function calls do work in the live environment as well, just not when nested (like I mentioned in the original issue).
See the following screenshot

if so, don’t nest it.

Like I mentioned in the original issue, I have a few complex function calls where nesting is required.
Moreover, this seems like a bug on Gemini’s end, not an intended limitation. Their schema also supports nesting.