n8n - 💡(How to fix) Fix Tool calling bug for agents using OpenRouter (various models) [1 comments, 2 participants]

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…
GitHub stats
n8n-io/n8n#29758Fetched 2026-05-06 06:35:22
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×1mentioned ×1subscribed ×1

Error Message

Describe the problem/error/question

What is the error message (if any)?

No error message but tool calls come back empty when executed as part of a flow

  • error: all
RAW_BUFFERClick to expand / collapse

Describe the problem/error/question

Flow setup: Schedule trigger node -> AI Agent (with openrouter + tool) -> Merge node

When executing the AI Agent using the "Execute step" button the tool works perfectly but when executing the node as part of the flow, the tool calls fail. They sometimes appear empty and sometime appear inside of the AI agents input.

Notes:

  • Various models tested and I ensured they had sufficient token context lengths
  • Various tools tested (brave search, gmail, http node) all failed the same way

What is the error message (if any)?

No error message but tool calls come back empty when executed as part of a flow

Please share your workflow/screenshots/recording

From within a flow <img width="1422" height="192" alt="Image" src="https://github.com/user-attachments/assets/3f28db24-a275-4bf2-ba1f-275f39bdc1d9" />

Example of tool call in AI input <img width="344" height="35" alt="Image" src="https://github.com/user-attachments/assets/3ec54a79-72a0-4981-8804-b66fb4c5a407" />

Using "execute step" button <img width="1483" height="264" alt="Image" src="https://github.com/user-attachments/assets/a2800e0c-ba8b-428c-936a-aca9469d7fca" />

Share the output returned by the last node

Example when failing [ { "response": { "generations": [ [ { "text": "I'm sorry, but I could not find any relevant information in the emails I have access to. Was there anything else I could help you with?", "generationInfo": { "finish_reason": "stop" } } ] ] }, "tokenUsage": { "completionTokens": 31, "promptTokens": 607, "totalTokens": 638 } } ]

Debug info

core

  • n8nVersion: 2.18.7
  • platform: docker (cloud)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: 5
  • license: enterprise (sandbox)

storage

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

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/147.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-05-05T07:56:23.115Z

extent analysis

TL;DR

The issue is likely due to differences in execution context between running the AI Agent node individually using the "Execute step" button and running it as part of a flow, which may affect how tool calls are handled.

Guidance

  • Verify that the tool calls are correctly configured and authenticated when run as part of the flow, as the issue might be related to how credentials or environment variables are passed.
  • Check the node's input and output parameters to ensure they are correctly set up for both individual execution and flow execution, as the tool calls appearing empty or inside the AI agent's input suggest a potential data handling issue.
  • Review the flow's concurrency settings, as the concurrency: 5 setting might influence how nodes are executed and how their outputs are handled.
  • Inspect the SQLite database for any errors or inconsistencies in how executions are logged, which might provide clues about what goes wrong when the node is executed as part of the flow.

Example

No specific code example can be provided without more details on the node's configuration and the exact tool calls being made.

Notes

The issue seems to be related to the execution context and how tool calls are managed within the flow, but without more specific details about the node's configuration, the tools being used, and the exact error behavior, it's challenging to provide a precise fix.

Recommendation

Apply a workaround by adjusting the flow's configuration, such as changing the concurrency setting or adding additional logging to understand the execution context better, as the root cause seems related to how the node interacts with the flow rather than a version-specific issue that would necessitate an upgrade.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix Tool calling bug for agents using OpenRouter (various models) [1 comments, 2 participants]