mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-04-12 14:31:44 +08:00
When serializing a multi-turn conversation for the OpenAI-compatible path, assistant messages with no tool calls were always emitting 'tool_calls: []'. Some providers reject requests where a prior assistant turn carries an explicit empty tool_calls array (400 on subsequent turns after a plain text assistant response). Fix: only include 'tool_calls' in the serialized assistant message when the vec is non-empty. Empty case omits the field entirely. This is a companion fix to |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| Cargo.toml | ||