incalculable-garage-37123
10/02/2025, 6:05 PMllama-3.3-70b-versatile) when using it with LiveKit. The problem only occurs when a function tool is executed — regular chat works fine. With Azure OpenAI LLM, the exact same setup works without any errors.
Here are the LiveKit package versions I’m using:
livekit==1.0.13
livekit-agents==1.2.13
livekit-api==1.0.5
livekit-blingfire==1.0.0
livekit-plugins-cartesia==1.2.13
livekit-plugins-deepgram==1.2.13
livekit-plugins-elevenlabs==1.2.13
livekit-plugins-groq==1.2.13
livekit-plugins-noise-cancellation==0.2.5
livekit-plugins-openai==1.2.13
livekit-plugins-silero==1.2.13
livekit-plugins-turn-detector==1.2.13
livekit-protocol==1.0.6
This is the function tool LLM trying to execute:
@function_tool
async def end_call(self, ctx: RunContext):
"""
Use this tool only after the assistant has spoken the final goodbye to the user by explicitly saying "bye" or "goodbye".
Do not execute this tool until the assistant has first generated and delivered a proper concluding message that includes a farewell.
This tool should never be called before the assistant has finished answering all of the user's questions and verbally ended the conversation.
"""
if self._session_logger:
self._session_logger.log_info(
LogComponent.AGENT,
"end_call function tool invoked by model.",
call_ended_reason=CallEndedReason.ASSISTANT_SAID_END_CALL_PHRASE
)
# Set the call end reason before shutting down
if hasattr(self, 'finalization_service'):
self.finalization_service._ended_reason = CallEndedReason.ASSISTANT_SAID_END_CALL_PHRASE
# Let the agent finish speaking
current_speech = ctx.session.current_speech
current_speech._allow_interruptions = False
await ctx.wait_for_playout()
get_job_context().shutdown()
Has anyone else faced this issue with Groq + LiveKit function tools? Any pointers would be really helpful.
Here’s the error I’m getting:
2025-10-02 23:16:46,346 - ERROR livekit.agents - Error in _execute_tools_task
Traceback (most recent call last):
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/voice/generation.py", line 425, in _execute_tools_task
fnc_args, fnc_kwargs = llm_utils.prepare_function_arguments(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/llm/utils.py", line 373, in prepare_function_arguments
if param_name in args_dict and args_dict[param_name] is None:
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable {"pid": 2346005, "job_id": "AJ_JxxyZtgChWaR"}
2025-10-02 23:16:47,147 - INFO session.agent - [bb9f3448-e5af-417a-9ba3-ddb2803d3b3e] tts_metrics metrics collected {"pid": 2346005, "job_id": "AJ_JxxyZtgChWaR"}
2025-10-02 23:16:55,113 - INFO session.llm - [bb9f3448-e5af-417a-9ba3-ddb2803d3b3e] LLM genearted Response {"pid": 2346005, "job_id": "AJ_JxxyZtgChWaR"}
2025-10-02 23:16:55,113 - ERROR livekit.agents - Error in _pipeline_reply_task
Traceback (most recent call last):
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/voice/agent_activity.py", line 1823, in _pipeline_reply_task
await exe_task
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/voice/generation.py", line 425, in _execute_tools_task
fnc_args, fnc_kwargs = llm_utils.prepare_function_arguments(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rashi-aidetic/Documents/Fabrichq/automated_call_notifications/venv/lib/python3.12/site-packages/livekit/agents/llm/utils.py", line 373, in prepare_function_arguments
if param_name in args_dict and args_dict[param_name] is None:
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable {"pid": 2346005, "job_id": "AJ_JxxyZtgChWaR"}
2025-10-02 23:16:57,647 - INFO livekit.agents - process exitingthousands-television-12141
10/05/2025, 10:21 AMincalculable-garage-37123
10/07/2025, 9:29 AM