able-leather-48732
12/22/2025, 11:51 AMValidationError 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?tall-airline-16756
12/22/2025, 11:51 AMtall-airline-16756
12/22/2025, 11:51 AMValidationError 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 docsable-leather-48732
12/22/2025, 1:02 PMtall-airline-16756
12/22/2025, 1:02 PM