-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report: Gemini Live API function calls always return empty arguments
Summary
Function calling with Gemini Live API through LiveKit always returns empty arguments (args={}
) even when function schemas are properly defined with required parameters. This affects all raw function tools using the parameters_json_schema
field instead of the correct parameters
field that Google's API expects.
Root Cause
The bug is in the to_fnc_ctx()
function in livekit/plugins/google/utils.py
, specifically in the raw function tool conversion path:
Current broken code:
if is_raw_function_tool(fnc):
info = get_raw_function_info(fnc)
tools.append(
types.FunctionDeclaration(
name=info.name,
description=info.raw_schema.get("description", ""),
parameters_json_schema=info.raw_schema.get("parameters", {}), # ← BUG: Wrong/depreciated field name
)
)
Should be:
if is_raw_function_tool(fnc):
info = get_raw_function_info(fnc)
tools.append(
types.FunctionDeclaration(
name=info.name,
description=info.raw_schema.get("description", ""),
parameters=info.raw_schema.get("parameters", {}), # ← Change to "parameter"?
)
)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working