Skip to content

thought_signature Error 400 for gemini-3-flash #4767

@markine

Description

@markine

Bug Description

Hi team. We're using gemini-3-flash with Livekit inference and Livekit cloud, running python agent 1.4.1.

Seeing thought_signature related errors of the type:

   12:34:42.038 WARNI… livekit.agents     failed to generate LLM completion, retrying in 0.1s                                                                                                            
                                           Traceback (most recent call last):                                                                                                                             
                                             File "/Users/XXXXXXXXXXX/.venv/lib/python3.13/site-packages/livekit/agents/llm/llm.py", line 206, in _main_task         
                                               return await self._run()                                                                                                                                   
                                                      ^^^^^^^^^^^^^^^^^                                                                                                                                   
                                             File "/Users/XXXXXXXXXXX/.venv/lib/python3.13/site-packages/livekit/agents/inference/llm.py", line 346, in _run         
                                               raise APIStatusError(                                                                                                                                      
                                               ...<5 lines>...                                                                                                                                            
                                               ) from None                                                                                                                                                
                                           livekit.agents._exceptions.APIStatusError: provider: google model: gemini-3-flash-preview, message: Error 400, 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:YYYYYYYYYYYYY` , position 28. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for    
                                           more details., Status: INVALID_ARGUMENT, Details: [].  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:YYYYYYYYYYYYY` , position    
                                           28. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details. (status_code=400, request_id=None, body=provider: google        
                                           model: gemini-3-flash-preview, message: Error 400, 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:YYYYYYYYYYY` ,        
                                           position 28. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details., Status: INVALID_ARGUMENT, Details: [].  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:YYYYYYYYYYY` , position 28. Please refer to                                              
                                           https://ai.google.dev/gemini-api/docs/thought-signatures for more details., retryable=True)                        

Looking at recent logs 1.4.x promised to resolve this but no luck. Any advice? I'd be happy to help debug further, I just don't have the context.

Thanks!

Expected Behavior

No errors for gemini 3 flash after upgrading to 1.4.x.

Reproduction Steps

1. 
2.
3.
...
- Sample code snippet, or a GitHub Gist link -

Operating System

Linux

Models Used

gemini-3-flash

Package Versions

"livekit-agents[turn-detector]==1.4.1",
    "livekit-plugins-deepgram==1.4.1",
    "livekit-plugins-openai==1.4.1",
    "livekit-plugins-silero==1.4.1",
    "livekit-agents[google]==1.4.1",
    "livekit-plugins-google==1.4.1",

Session/Room/Call IDs

No response

Proposed Solution

Additional Context

No response

Screenshots and Recordings

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions