Skip to content

[BUG] Gemini-3-Pro-Preview: Function call missing thought_signature #521

Description

@karthik-m-jain

Basic checks

  • I searched existing issues - this hasn't been reported
  • I can reproduce this consistently
  • This is a RubyLLM bug, not my application code

What's broken?

When using the Gemini-3-Pro-Preview model with RubyLLM and tools (function calling), the API returns an error about a missing thought_signature in functionCall parts. This prevents tool use with Gemini-3-Pro-Preview.

How to reproduce

  • Configure RubyLLM with model = "gemini-3-pro-preview"
  • Add a tool and call it via chat.
  • Observe the error from the Gemini API.

Expected behavior

Tool calls should work with Gemini-3-Pro-Preview, and the required thought_signature should be included in the functionCall parts automatically.

What actually happened

The Gemini API returns:

RubyLLM::BadRequestError (Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.)

Debug logs show the error occurs every time a tool is called.

Environment

  • Ruby version: 3.3.6
  • RubyLLM version: 1.9.1
  • Provider: Gemini-3-Pro-Preview
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions