Commit Graph

1 Commits

Author SHA1 Message Date
Marvin 2e84b9942f fix(server): rescue Bailing/Ling tool calls trapped in reasoning
Thinking models of the Bailing family intermittently emit <tool_call>
arg_key/arg_value XML inside the thinking block. The PEG layer consumes
that region as reasoning_content before the tool stage, so the call is
lost: empty content, no structured calls. update_chat_msg now promotes
well-formed blocks to tool calls on final parses with empty content.
Strictly additive; ids flow through set_tool_call_ids. Verified with a
standalone harness against live-captured payloads.
2026-09-07 20:52:38 -03:00