I randomly receive empty response from LLM followed by UNKNOWN_ERROR.
The pattern I see is that this happens when agent 1. answer with text, 2. calls the tool and gets the result 3. Want to provide follow up message to the user.
Sometimes it works perfect, and sometimes I receive empty answer like this:
LLM Response:
Text:
None
Function calls:
Raw response:
{"model_version":"gemini-2.5-pro-preview-03-25","usage_metadata":{"prompt_token_count":9314,"prompt_tokens_details":[{"modality":"TEXT","token_count":9314}],"total_token_count":9314},"automatic_function_calling_history":[]}
Which later is followed by event with UNKNOWN_ERROR:
INFO | google.adk.sessions.database_session_service:append_event:439 - Append event: content=None grounding_metadata=None partial=None turn_complete=None error_code='UNKNOWN_ERROR' error_message='Unknown error.' interrupted=None custom_metadata=None invocation_id='e-7b409bad-ccfd-410c-ace1-424df582e296' author='host_agent' actions=EventActions(skip_summarization=None, state_delta={'artifact_list': ['user:app_profile.json', 'user:user_profile.json']}, artifact_delta={}, transfer_to_agent=None, escalate=None, requested_auth_configs={}) long_running_tool_ids=None branch=None id='ahgJFXKb' timestamp=1746279733.766547 to session 0ddb7351-375a-4007-a983-f4dd768b4870 - {}
Python 3.11.11
Name: google-adk
Version: 0.3.0
I randomly receive empty response from LLM followed by UNKNOWN_ERROR.
The pattern I see is that this happens when agent 1. answer with text, 2. calls the tool and gets the result 3. Want to provide follow up message to the user.
Sometimes it works perfect, and sometimes I receive empty answer like this:
LLM Response:
Text:
None
Function calls:
Raw response:
{"model_version":"gemini-2.5-pro-preview-03-25","usage_metadata":{"prompt_token_count":9314,"prompt_tokens_details":[{"modality":"TEXT","token_count":9314}],"total_token_count":9314},"automatic_function_calling_history":[]}
Which later is followed by event with UNKNOWN_ERROR:
INFO | google.adk.sessions.database_session_service:append_event:439 - Append event: content=None grounding_metadata=None partial=None turn_complete=None error_code='UNKNOWN_ERROR' error_message='Unknown error.' interrupted=None custom_metadata=None invocation_id='e-7b409bad-ccfd-410c-ace1-424df582e296' author='host_agent' actions=EventActions(skip_summarization=None, state_delta={'artifact_list': ['user:app_profile.json', 'user:user_profile.json']}, artifact_delta={}, transfer_to_agent=None, escalate=None, requested_auth_configs={}) long_running_tool_ids=None branch=None id='ahgJFXKb' timestamp=1746279733.766547 to session 0ddb7351-375a-4007-a983-f4dd768b4870 - {}
Python 3.11.11
Name: google-adk
Version: 0.3.0