Files
LangBot/tests/unit_tests
Junyan Chin 3d5b70cc5d fix(modelmgr): keep id-less streamed tool calls (Ollama) (#2262)
Ollama's OpenAI-compatible streaming endpoint emits a tool-call delta
carrying an `index` and a `function` payload but never an OpenAI-style
`id`. `_normalize_stream_tool_calls` dropped any tool call without an
`id`, so a tool-only turn yielded neither content nor a tool call: the
stream "completed" with 0 chars, the tool never ran, and the chat
appeared stuck. Models on standard OpenAI APIs (e.g. SiliconFlow) were
unaffected because they always send a `call_...` id.

Synthesize a stable per-index id (`call_<index>`) when the provider
omits one but a function name is present. Providers that do send ids
keep theirs, and parallel id-less calls keep distinct ids.

Adds regression tests for the single and multi id-less tool-call cases.

Fixes #2261
2026-06-19 18:07:25 +08:00
..
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-06-16 11:22:29 +08:00
2026-05-16 12:05:54 +08:00
2026-06-03 11:12:39 +08:00
2026-06-03 11:12:39 +08:00
2026-06-03 11:12:39 +08:00