=== tool-forced-stream === --- INPUT (POST chat, request.json) --- { "model": "zai-org/GLM-5.3", "messages": [ { "role": "user", "content": "Use add_numbers to add 17 and 25." } ], "max_tokens": 1024, "tools": [ { "type": "function", "function": { "name": "add_numbers", "description": "Add two integers", "parameters": { "type": "object", "properties": { "a": { "type": "integer" }, "b": { "type": "integer" } }, "required": [ "a", "b" ], "additionalProperties": false } } } ], "tool_choice": { "type": "function", "function": { "name": "add_numbers" } }, "stream": true, "reasoning_effort": "none", "stream_options": { "include_usage": true } } --- OUTPUT (HTTP 200, 3.9 s, pass=True) --- data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_afcef3904046451f89bd56f3","type":"function","function":{"name":"add_numbers","arguments":""}}]},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"type":"function","function":{"arguments":"{"}}]},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"type":"function","function":{"arguments":"\"a\": 17"}}]},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"type":"function","function":{"arguments":", \"b\": "}}]},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"type":"function","function":{"arguments":"25"}}]},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"type":"function","function":{"arguments":"}"}}]},"finish_reason":null,"logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[{"index":0,"delta":{},"finish_reason":"tool_calls","logprobs":null}],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk"} data: {"id":"ab6b893171f24f6192434a8194b863ee","choices":[],"created":1792329979,"model":"zai-org/GLM-5.3","object":"chat.completion.chunk","usage":{"prompt_tokens":174,"completion_tokens":17,"total_tokens":191,"prompt_tokens_details":{"cached_tokens":128}}} data: [DONE] === tool-forced-stream-roundtrip === --- INPUT (POST chat, request.json) --- { "model": "zai-org/GLM-5.3", "messages": [ { "role": "user", "content": "Use add_numbers to add 17 and 25." }, { "role": "assistant", "content": null, "tool_calls": [ { "id": "call_afcef3904046451f89bd56f3", "type": "function", "function": { "name": "add_numbers", "arguments": "{\"a\": 17, \"b\": 25}" } } ] }, { "role": "tool", "tool_call_id": "call_afcef3904046451f89bd56f3", "content": "42" }, { "role": "user", "content": "Reply with exactly 42." } ], "max_tokens": 1024, "tools": [ { "type": "function", "function": { "name": "add_numbers", "description": "Add two integers", "parameters": { "type": "object", "properties": { "a": { "type": "integer" }, "b": { "type": "integer" } }, "required": [ "a", "b" ], "additionalProperties": false } } } ], "tool_choice": "none", "stream": false, "reasoning_effort": "none" } --- OUTPUT (HTTP 200, 3.2 s, pass=True) --- {"id":"93279a3e8dc646e583e3bf32752666b8","choices":[{"index":0,"message":{"content":"42","refusal":null,"role":"assistant"},"finish_reason":"stop","logprobs":null}],"created":1792329982,"model":"zai-org/GLM-5.3","object":"chat.completion","usage":{"prompt_tokens":47,"completion_tokens":2,"total_tokens":49,"prompt_tokens_details":{"cached_tokens":0}}}