I'm facing issue when integrating Gemini Live with...
# ask-ai
a
I'm facing issue when integrating Gemini Live with my existing voice ai system. The issue is specifically regarding Gemini Realtime API crash due to
ValidationError
in
JSONSchema
($schema extra input). Traceback:
pydantic_core._pydantic_core.ValidationError: 1 validation error for JSONSchema
$schema: Extra inputs are not permitted [type=extra_forbidden]
Context: • SDK:
livekit-agents
v1.3.9 and
livekit-plugins-google
. • Problem: Occurs during
session.start()
when calling
update_tools
. It seems the Google plugin's internal
to_fnc_ctx
utility isn't stripping the
$schema
key from tool definitions before validation. • Tools: I use a mix of
@function_tool
and dynamic factory-generated tools. Question: Is this a known bug in the Google plugin's schema sanitizer, or is there a specific way I should be stripping these keys when using dynamic tools?
t
Thanks for reaching out, maleek. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you: you’re hitting a
ValidationError
for
$schema
during
session.start()
when
update_tools
runs, and you suspect the Google plugin’s
to_fnc_ctx
isn’t stripping
$schema
from tool JSON schemas. I don’t have any documentation or notes that this is a known bug in the Google plugin’s schema sanitizer, and there’s no official guidance showing an automatic strip of
$schema
. To help narrow this down and give a concrete next step, could you share the following: 1. A minimal reproducible example (Python) that shows how you create the dynamic tool(s) and call
session.start()
/
update_tools
. 2. The exact tool definition (or one example) that includes the
$schema
key as passed into the plugin (redact any secrets). 3. The versions of
livekit-plugins-google
and
livekit-agents
(you mentioned
livekit-agents
v1.3.9; please confirm
livekit-plugins-google
exact version). While you gather that, a practical workaround you can try immediately: before passing dynamic tool definitions to
update_tools
, remove
$schema
from each tool’s JSON/schema object (e.g., pop the
$schema
key). If that prevents the ValidationError it indicates the sanitizer/validator is rejecting extra keys and confirms the immediate cause. Send the minimal example and tool payload and I’ll look at it and recommend the next fix or pinpoint whether this looks like a plugin bug. Sources: Tool definition and use | LiveKit docs
a
do i need paid GOOGLE_GEMINI account or would a free tier google gemini work for streaming calling in LLM and Gemini Live...
t
Thanks — I’m responding to your question about whether you need a paid Google Gemini account for streaming/LLM + Gemini Live. You do not need a paid Gemini consumer subscription. A free Google Cloud project/API key is sufficient to call Gemini LLM and Gemini Live via the LiveKit plugins, as long as: • You enable billing on the Google Cloud project that holds the API key (Google requires billing to be enabled even if you stay within free quotas). • You accept that usage is billed per the Gemini API pricing (usage may be free within quota limits but beyond that you’ll incur charges). If you want, tell me which model and expected traffic (concurrent streams / tokens per minute) you plan to use and I can help estimate likely costs or recommend quota/billing settings. Sources: Google Gemini LLM plugin guide | LiveKit docs | Gemini Live API plugin | LiveKit docs