open-webui/backend
Bugale Bugalit 29f757490e fix: don't drop a tool call whose id an earlier round already used
The tool loop builds `output` once per request but runs many rounds inside it,
and each round skips a function_call whose id appears anywhere in `output` -
including rounds already completed. Results are rebuilt per round and appended
regardless, so an id a later round reuses loses its call and keeps its result.

The turn then holds function_call_output items with no function_call, and the
next request fails at the provider with "tool message tool_call_id '...' does
not match any tool call in the preceding assistant messages". The malformed turn
is persisted, so retrying cannot succeed and every later message in that chat
fails the same way.

Renaming a reused id restores the pairing. Scoped to ids that are already
answered, so the case the dedup exists for - Responses API items already in
`output` and still awaiting a result - is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 17:55:32 +03:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix: don't drop a tool call whose id an earlier round already used 2026-08-09 17:55:32 +03:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh refac 2026-03-24 19:43:30 -05:00
requirements-min.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
requirements.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
start.sh refac 2026-06-17 03:01:11 +02:00
start_windows.bat refac 2026-06-17 03:01:11 +02:00