Tool Calls Skipped When Agent Uses Pre-Prompt Text (e.g., “Hold on and let me…”) #7624
Unanswered
nico525
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
-
It’s an LLM/provider issue. If the API response doesn’t respond with tool calls, nothing will happen, the turn will end. I’ve actually noticed this with Azure more than any other provider, as you observed. Try using the latest API version according to their documentation in the azure config. You can also contact them or research on their end for more support. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
We’ve observed a recurring issue in LibreChat where tool calls are not being triggered by the agent when the system prompt or output is pre-engineered to begin with language such as:
“This is a great question. Hold on and let me search in wiki before answering.”
In these cases, the agent generates the initial message but then halts, failing to invoke the tool as expected. If manually prompted again (e.g., with “continue”), the agent will proceed and make the tool call — but this breaks the intended autonomous behavior.
This issue appears to occur inconsistently — roughly 50% of the time in our tests — and is significantly worse on older models like GPT-4o.
Behavior Details
• Expected Behavior:
The agent should automatically call the necessary tool after generating the initial message, without requiring user intervention.
• Actual Behavior:
The agent stops after the preamble and does not call the tool. It only proceeds after receiving a follow-up prompt.
• Streaming:
Streaming is enabled, and we suspect this may contribute to the tool call being skipped prematurely.
• Affected Models:
• Azure OpenAI GPT-4.1 (intermittent failure)
• GPT-4o (higher failure rate)
• Tool Details:
The issue occurs with a custom-written tool (not publicly available), integrated via the standard tool interface.
• Possibly Related Issues:
A similar behavior was discussed in langchain4j, though not confirmed as identical:
langchain4j/issues/2385
Version Information
Environment
• LibreChat version: v0.7.8
• LLM Provider: Azure OpenAI
• Model used: GPT-4.1 (intermittent), GPT-4o (frequent)
• Streaming: Enabled
Steps to Reproduce
“Great question. Let me search wiki first…”
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions