Skip to content

[Bug]: Gemini Model missing thought_signature as being an aggregator in MoA model #65092

Description

@kenmjlee

Bug Description

When Hermes Agent routes a request through the Gemini provider in MoA (aggregator) mode, the Gemini API rejects every function call with a 400 INVALID_ARGUMENT error stating that thought_signature is missing from functionCall parts. This makes it impossible for any Gemini-based model to act as an aggregator worker but they work independently well as either a reference model or a main model.

Steps to Reproduce

  1. Configure Hermes Agent with a Gemini model (e.g., gemini-3.5-flash) as the aggregator provider.
  2. Enable MoA mode as the main model
  3. Chat with the agent
  4. Observe the thought_signature error in the logs after references return results.

Expected Behavior

• Gemini aggregator workers should function normally in MoA mode.

Actual Behavior

Every tool call from a Gemini aggregator results in a 400 INVALID_ARGUMENT error.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

2026-07-15 15:36:37,322 WARNING [20260715_153436_1c53f7] agent.conversation_loop: API call failed (attempt 1/3) error_type=GeminiAPIError thread=Thread-30 (run):281471587447136 provider=moa base_url=moa://local model=testing summary=HTTP 400: Gemini HTTP 400 (INVALID_ARGUMENT): 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:terminal` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.
2026-07-15 15:36:37,359 ERROR [20260715_153436_1c53f7] agent.conversation_loop: Non-retryable client error: Gemini HTTP 400 (INVALID_ARGUMENT): 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:terminal` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.

Operating System

macOS 26.5.2 (deploying the latest hermes image via Apple Container)

Python Version

3.13.5

Hermes Version

0.18.2

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsbugcomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointprovider/geminiGoogle Gemini (AI Studio, Cloud Code)type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions