Skip to content

fix(llm) - Fix Raw Schema for Google Gemini#5450

Open
fgoessl wants to merge 4 commits intolivekit:mainfrom
fgoessl:fix-gemini-raw-function-tool
Open

fix(llm) - Fix Raw Schema for Google Gemini#5450
fgoessl wants to merge 4 commits intolivekit:mainfrom
fgoessl:fix-gemini-raw-function-tool

Conversation

@fgoessl
Copy link
Copy Markdown

@fgoessl fgoessl commented Apr 14, 2026

Bug Description

Function tools work correctly with Google Gemini if they are declared using the @function_tool decorator.

If they are supplied as a Raw Schema however, only the tool name and the tool description are visible to the model and the parameters are empty. As a result the tool cannot be properly used by the model.

Steps to Reproduce

  1. Define a tool using a raw schema as described here https://docs.livekit.io/agents/logic/tools/definition/#creating-tools-from-raw-schema.
  2. Use: livekit-agents==1.5.2 and gemini-live-2.5-flash-native-audio.
  3. Observe the tool calls and/or directly ask the model on what tools it has access to and what parameters they have.

Expected Behavior

The parameters are available to the model. The behaviour of decorated tools and tools generated from raw schemata should match.

Actual Behaviour

Only the tool name and description are available to the model.

I would be happy to add some tests if needed. Just let me know how they are handled here.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 14, 2026

CLA assistant check
All committers have signed the CLA.

@fgoessl fgoessl marked this pull request as ready for review April 23, 2026 15:56
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants