n8n - 💡(How to fix) Fix AI Agent + Vertex `gemini-3.5-flash`: 400 "missing thought_signature" on sequential multi-turn tool calls (post-#24982)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

The underlying Vertex error is the familiar Function call is missing a thought_signature. This appears related to #23798 / #24889 and the fixes shipped in #24473 (single tool, n8n 2.6.0) and #24982 (parallel tool calls, n8n 2.7.0), but my scenario is sequential multi-turn with gemini-3.5-flash, which I don't believe either PR covered.

  • error: all
RAW_BUFFERClick to expand / collapse

Bug Description

On n8n 2.21.7, using gemini-3.5-flash via the Vertex AI Chat Model node (@n8n/n8n-nodes-langchain.lmChatGoogleVertex) inside an AI Agent fails with 400 Bad Request from Vertex on the second turn — i.e. when n8n posts the tool result back to the model after a successful function call.

The underlying Vertex error is the familiar Function call is missing a thought_signature. This appears related to #23798 / #24889 and the fixes shipped in #24473 (single tool, n8n 2.6.0) and #24982 (parallel tool calls, n8n 2.7.0), but my scenario is sequential multi-turn with gemini-3.5-flash, which I don't believe either PR covered.

First request (model → tool call) works correctly. Second request (tool result → model continuation) fails with 400.

Swapping the model to gemini-2.5-flash in the same workflow works end-to-end, isolating the issue to the gemini-3.x thinking models + Vertex provider in n8n.

When n8n builds the follow-up contents array, the previous assistant message containing the functionCall part appears to be reconstructed without the thoughtSignature field that Vertex issued. Vertex requires every functionCall part in the conversation history to carry its original signature, not just those produced in parallel within one response.

To Reproduce

  1. Create a workflow with an AI Agent (@n8n/n8n-nodes-langchain.agent, typeVersion 1.8).
  2. Connect a Google Vertex Chat Model (lmChatGoogleVertex, typeVersion 1) with:
    • modelName: gemini-3.5-flash
    • options.temperature: 0.3
    • options.thinkingBudget: 0
  3. Connect at least one Tool Workflow (toolWorkflow, typeVersion 2.1) to the AI Agent.
  4. (Optional) Connect a MongoDB Chat Memory and a Structured Output Parser.
  5. Send a user message that causes the model to invoke the tool.
  6. Observe: the tool runs successfully and returns data.
  7. Observe: the next request (tool result → model) fails with HTTP 400.

Switching the chat model to gemini-2.5-flash (same workflow, nothing else changed) makes the agent complete the turn without errors.

Expected behavior

After a tool returns, n8n should be able to send the tool result back to Vertex and receive the model's continuation, completing the agent turn. The thoughtSignature from the previous assistant functionCall part should be preserved when constructing the follow-up request so Vertex's validation passes — the same behavior already achieved for parallel tool calls in #24982, but applied to the sequential multi-turn case as well.

Debug Info

Debug info

core

  • n8nVersion: 2.21.7
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.15.0
  • nodeEnv: production
  • database: postgres
  • executionMode: scaling (single-main)
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: fe26e0b6-c656-4849-a6dd-f2f22571b35c

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: database

pruning

  • enabled: false

client

  • userAgent: mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, like gecko) chrome/148.0.0.0 safari/537.36
  • isTouchDevice: false

security

  • secureCookie: false

cluster

  • instanceCount: 14
  • versions: 2.21.7
  • instances:
    • instanceKey: 3991f098-bd73-4f18-82c9-89f2ad985046, hostId: worker-0f9952148b9a, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 56dc2cd9-8216-419d-8b74-7b600b65b45d, hostId: worker-36b27e949b6a, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 93d623d2-3329-43fc-a374-c3a987959f85, hostId: worker-ab4c9ac828da, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 22d1e1e3-4373-4771-9aa3-5ee818624ea6, hostId: worker-a8388081d21a, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: dd092197-c7e1-4f25-a95b-b36ca24f038e, hostId: webhook-67f3db8bdcd3, instanceType: webhook, instanceRole: unset, version: 2.21.7
    • instanceKey: a5d6caec-30b1-435a-9096-caea54b980a2, hostId: worker-f0332492b7dd, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 6d05b475-bf17-4301-bef7-2136f31c70ea, hostId: worker-9dbf86644342, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: c4f40aee-745a-4d23-9b6f-b0215039314c, hostId: worker-35a225b2ef1e, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 7553f267-2ca3-42d7-9dda-fc97c0eb35fa, hostId: worker-5049867dba0d, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 5edcfa2a-8942-4944-90fc-dc304d3809cf, hostId: worker-cc64bc4484ed, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 0136166d-8ff3-4416-b219-3ad46c9207ef, hostId: worker-539d1d4f56ba, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: c0e07bb5-5f77-4b2c-b2ed-e83902c5e7f6, hostId: worker-f36cfaf7810b, instanceType: worker, instanceRole: unset, version: 2.21.7
    • instanceKey: 23337ccf-7a1c-4274-8ead-e19d655f34fa, hostId: main-a4c571afd829, instanceType: main, instanceRole: leader, version: 2.21.7
    • instanceKey: 6869027a-f393-401c-bbbe-8a9cb083ccff, hostId: worker-19f4f79b9321, instanceType: worker, instanceRole: unset, version: 2.21.7
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-05-28T14:23:07.337Z

Operating System

Linux (Docker container: docker.n8n.io/n8nio/n8n:2.21.7 - Ubuntu 22.04)

n8n Version

2.21.7

Node.js Version

24.15.0

Database

PostgreSQL

Execution mode

queue

Hosting

self hosted

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

After a tool returns, n8n should be able to send the tool result back to Vertex and receive the model's continuation, completing the agent turn. The thoughtSignature from the previous assistant functionCall part should be preserved when constructing the follow-up request so Vertex's validation passes — the same behavior already achieved for parallel tool calls in #24982, but applied to the sequential multi-turn case as well.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING