gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

API error

Open chrisohalloran opened this issue 1 year ago • 2 comments

What happened?

Getting this error when sending a message:

[API Error: {"error":{"message":"{\n "error": {\n "code": 400,\n "message": "* GenerateContentRequest.tools[0].function_declarations[37].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[39].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[40].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (_), dots (.) or dashes (-), with a maximum length of 64.\n",\n "status": "INVALID_ARGUMENT"\n }\n}\n","code":400,"status":"Bad Request"}}]

What did you expect to happen?

the LLM to start working

Client information

  • CLI Version: 0.1.22
  • Git Commit: 5fe4e023
  • Session ID: 990c9b9b-56ec-42a7-b738-310e6d8fee71
  • Operating System: darwin v24.1.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 208.9 MB

Login information

No response

Anything else we need to know?

No response

chrisohalloran avatar Aug 21 '25 00:08 chrisohalloran

Removed all MCP servers which resolved the issue, some better debugging information would be helpful.

chrisohalloran avatar Aug 21 '25 00:08 chrisohalloran

Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.

It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.

Thank you for your contribution!

gemini-cli[bot] avatar Dec 03 '25 22:12 gemini-cli[bot]