Skip to content

[Bug]: Function call missing thought_signature in functionCall when using Google models #375

@andr-uv

Description

@andr-uv

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • I am using the latest version of Moltis
  • If this happened during a chat session, I included as much full session context as possible and redacted secrets

What happened?

When using Google models, every time a function is called, the system returns an Error: HTTP 400 message about thought signatures and thought signatures.

For example, here I just asked my agent to give me a simple breakdown of the system it was running on (which simply implied running uname -a && lscpu | grep "Model name" && free -h, and which was pretty easily handled when working with MiniMax 2.5 via OpenRouter):

Error: HTTP 400: [{
  "error": {
    "code": 400,
    "message": "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, function call `default_api:exec` , position 17. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",
    "status": "INVALID_ARGUMENT"
  }
}
]

Even though this is known behavior (as can be seen by Google's own error message), I'm not really sure what the best Moltis-compatible solution is.

Expected behavior

A simple, short message, like the one the agents send when running on MiniMax 2.5:

System Breakdown:

- Hostname: 9ae908dcb5fc (the container ID)
- Kernel: Linux 6.12.67-v8+ on aarch64 (ARM64 — your Raspberry Pi vibes)
- Uptime: 9 hours, 5 minutes
- Load: 0.07 — super chill, basically idle

Steps to reproduce

  1. Configure model to be any of the Google Gemini 3.0 or 3.1 family
  2. Use the web UI or the Telegram integration
  3. Send agent a simple request requiring any kind of tool calling
  4. Immediately receive error message above

Did this happen during a chat session?

Yes

Chat session context (if applicable)

Message sent to Moltis agent:


OK, the weirdness started happening when you invoked tools (that was like 3 or 4 Moltis versions ago, but you're running the latest version now. Let's see if anything's changed.)

So, let's invoke some tools.

First, give me a basic breakdown (nothing too fancy) of the system you're running on, D.

Error messages / logs

Error: HTTP 400: [{
  "error": {
    "code": 400,
    "message": "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, function call `default_api:exec` , position 17. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",
    "status": "INVALID_ARGUMENT"
  }
}
]

Is this a regression?

No, this never worked

Last working version

No response

Moltis version

0.10.18

Component

Gateway / Web UI

Install method

Docker

Operating system

Ubuntu / Debian

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions