max_tokens=0 made stream_agent_loop omit the param entirely, which on some OpenAI-compat upstreams (DeepSeek in the report) meant the model defaulted to a very short or zero-token completion — the user saw "the model returned an empty" even though normal chat with the same model worked (chat sends its preset's max_tokens). Match the chat default.
75 KiB
75 KiB