Skip to content

GoogleLLMService throws 400 error when using gemini 3 flash and executing multiple tool calls in one LLM turn #3290

@markbackman

Description

@markbackman

pipecat version

0.0.98

Python version

3.12.11

Operating System

macOS 15

Issue description

When the LLM executes multiple tool calls in a single turn, the following error is thrown:

GoogleLLMService#0 exception (~/src/pipecat/.venv/lib/python3.12/site-packages/google/genai/errors.py:210): Unknown error occurred: 400 Bad Request. {'message': '{\n  "error": {\n    "code": 400,\n    "message": "Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:get_restaurant_recommendation` , position 7. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",\n    "status": "INVALID_ARGUMENT"\n  }\n}\n', 'status': 'Bad Request'}

Reproduction steps

  1. Run https://github.com/pipecat-ai/pipecat/blob/main/examples/foundational/14e-function-calling-google.py
  2. Say, "Hi. I'm in Atlanta. Can you give me the weather and a restaurant recommendation?"
  3. Bot says "Let me check on that", then thee 400 error.

Expected behavior

Bot functions are called.

Actual behavior

400 error

Logs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions