An INVALID_ARGUMENT error (HTTP 400) is triggered when the orchestrator sends a tool response back to the Gemini API without specifying the function name.
Error Log:
HTTP 400: gemini-native: [{ "error": { "code": 400, "message": "* GenerateContentRequest.contents[3].parts[0].function_response.name: Name cannot be empty.\n", "status": "INVALID_ARGUMENT" } } ]
HTTP 400: gemini-native: [{ "error": { "code": 400, "message": "* GenerateContentRequest.contents[3].parts[0].function_response.name: Name cannot be empty.\n", "status": "INVALID_ARGUMENT" } } ]
Root Cause Analysis: The error occurs during the Tool Calling loop. Gemini API requires that every function_response part must have a name field that matches the function_call name requested by the model. In this instance, the orchestrator is sending a function_response where the name field is either empty, null, or undefined, causing the API to reject the entire request.
An INVALID_ARGUMENT error (HTTP 400) is triggered when the orchestrator sends a tool response back to the Gemini API without specifying the function name.
Error Log:
HTTP 400: gemini-native: [{ "error": { "code": 400, "message": "* GenerateContentRequest.contents[3].parts[0].function_response.name: Name cannot be empty.\n", "status": "INVALID_ARGUMENT" } } ]
HTTP 400: gemini-native: [{ "error": { "code": 400, "message": "* GenerateContentRequest.contents[3].parts[0].function_response.name: Name cannot be empty.\n", "status": "INVALID_ARGUMENT" } } ]
Root Cause Analysis: The error occurs during the Tool Calling loop. Gemini API requires that every function_response part must have a name field that matches the function_call name requested by the model. In this instance, the orchestrator is sending a function_response where the name field is either empty, null, or undefined, causing the API to reject the entire request.