Commit 1da35db
authored
fix(provider): only send tool_stream for Z.AI providers in streaming path (zeroclaw-labs#5806)
Squashed commits:
* a639203 fix(provider): only send tool_stream for Z.AI providers in streaming path
The streaming method stream_chat_with_tools unconditionally set
tool_stream: true for all providers when streaming was enabled.
This caused 400 Bad Request errors on non-Z.AI OpenAI-compatible
endpoints (e.g. litellm proxies) that reject the unrecognized
tool_stream key.
The non-streaming path already correctly used tool_stream_for_tools()
which gates on requires_tool_stream() (Z.AI host or name check).
Apply the same guard to both streaming payload branches so the field
is only serialized for Z.AI providers.
Related: zeroclaw-labs#29011 parent 9328946 commit 1da35db
1 file changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2195 | 2195 | | |
2196 | 2196 | | |
2197 | 2197 | | |
2198 | | - | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
2199 | 2203 | | |
2200 | 2204 | | |
2201 | 2205 | | |
| |||
2215 | 2219 | | |
2216 | 2220 | | |
2217 | 2221 | | |
2218 | | - | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
2219 | 2227 | | |
2220 | 2228 | | |
2221 | 2229 | | |
| |||
3597 | 3605 | | |
3598 | 3606 | | |
3599 | 3607 | | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
3600 | 3616 | | |
3601 | 3617 | | |
3602 | 3618 | | |
| |||
0 commit comments