issue: Tool calls to the same tool seem to output invalid JSON #5121

Closed
opened 2025-11-11 16:12:45 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @signorecello on GitHub (May 9, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.7

Ollama Version (if applicable)

0.6.8

Operating System

Debian 12

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

Could only test this with Todoist MCP servers (via mcpo) but both implementations yield the same result so I'm pretty sure this happens with other tools as well.

When the model makes multiple calls to the same tool (ex. adding multiple tasks), I would expect them to be run

Actual Behavior

Instead I get a never-ending tool call. Inspecting the JSON, seems like they're not returning valid JSON (separated with commas).

Steps to Reproduce

  1. Add a tool that can be called multiple times in the same response (ex. Todoist, Notion, Calendar, etc)
  2. Trigger a response that would generate multiple calls

Logs & Screenshots

You can ignore the memory thing, this still happens without it.

Image

"{\"content\": \"<truncated>\", \"deadlineDate\": \"2025-05-09\", \"deadlineLang\": \"en\", \"priority\": 2}{\"content\": \"<truncated>\", \"deadlineDate\": \"2025-05-11\", \"deadlineLang\": \"en\", \"priority\": 2}{\"content\": \"<truncated>\", \"deadlineDate\": \"2025-05-16\", \"deadlineLang\": \"en\", \"priority\": 2}"

Docker logs:

{'role': 'assistant', 'content': '', 'tool_calls': [{'index': 0, 'id': 'call_f97e27db-07d0-492c-8b97-58585ea95b52', 'type': 'function', 'function': {'name': 'tool_add_task_posttool_add_task_posttool_add_task_post', 'arguments': '{"content": "<truncated>", "deadlineDate": "2025-05-09", "deadlineLang": "en", "priority": 2}{"content": "<truncated>", "deadlineDate": "2025-05-11", "deadlineLang": "en", "priority": 2}{"content": "<truncated>", "deadlineDate": "2025-05-16", "deadlineLang": "en", "priority": 2}'}}]}, {'role': 'tool', 'tool_call_id': 'call_f97e27db-07d0-492c-8b97-58585ea95b52', 'content': None}]}

Additional Information

No response

Originally created by @signorecello on GitHub (May 9, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.7 ### Ollama Version (if applicable) 0.6.8 ### Operating System Debian 12 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior Could only test this with Todoist MCP servers (via `mcpo`) but both implementations yield the same result so I'm pretty sure this happens with other tools as well. When the model makes multiple calls to the same tool (ex. adding multiple tasks), I would expect them to be run ### Actual Behavior Instead I get a never-ending tool call. Inspecting the JSON, seems like they're not returning valid JSON (separated with commas). ### Steps to Reproduce 1. Add a tool that can be called multiple times in the same response (ex. Todoist, Notion, Calendar, etc) 2. Trigger a response that would generate multiple calls ### Logs & Screenshots You can ignore the memory thing, this still happens without it. ![Image](https://github.com/user-attachments/assets/568c9666-71f6-4727-b025-6d6954b0dde4) ```json "{\"content\": \"<truncated>\", \"deadlineDate\": \"2025-05-09\", \"deadlineLang\": \"en\", \"priority\": 2}{\"content\": \"<truncated>\", \"deadlineDate\": \"2025-05-11\", \"deadlineLang\": \"en\", \"priority\": 2}{\"content\": \"<truncated>\", \"deadlineDate\": \"2025-05-16\", \"deadlineLang\": \"en\", \"priority\": 2}" ``` Docker logs: ```json {'role': 'assistant', 'content': '', 'tool_calls': [{'index': 0, 'id': 'call_f97e27db-07d0-492c-8b97-58585ea95b52', 'type': 'function', 'function': {'name': 'tool_add_task_posttool_add_task_posttool_add_task_post', 'arguments': '{"content": "<truncated>", "deadlineDate": "2025-05-09", "deadlineLang": "en", "priority": 2}{"content": "<truncated>", "deadlineDate": "2025-05-11", "deadlineLang": "en", "priority": 2}{"content": "<truncated>", "deadlineDate": "2025-05-16", "deadlineLang": "en", "priority": 2}'}}]}, {'role': 'tool', 'tool_call_id': 'call_f97e27db-07d0-492c-8b97-58585ea95b52', 'content': None}]} ``` ### Additional Information _No response_
GiteaMirror added the bug label 2025-11-11 16:12:45 -06:00
Author
Owner

@tjbck commented on GitHub (May 9, 2025):

Model dependent behaviour, we'd recommend using higher end models.

@tjbck commented on GitHub (May 9, 2025): Model dependent behaviour, we'd recommend using higher end models.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5121