=== tool-auto === --- INPUT (POST chat, request.json) --- { "model": "zai-org/GLM-5.3", "messages": [ { "role": "user", "content": "Use the add_numbers tool to add 17 and 25. Do not answer in text." } ], "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": "auto", "stream": false, "reasoning_effort": "none" } --- OUTPUT (HTTP 200, 3.4 s, pass=True) --- {"id":"970642871270421a9756d081d0663902","choices":[{"index":0,"message":{"content":null,"refusal":null,"tool_calls":[{"id":"call_fe632e1f2031440c80fa6a0c","type":"function","function":{"name":"add_numbers","arguments":"{\"a\": 17, \"b\": 25}"}}],"role":"assistant"},"finish_reason":"tool_calls","logprobs":null}],"created":1792329986,"model":"zai-org/GLM-5.3","object":"chat.completion","usage":{"prompt_tokens":182,"completion_tokens":17,"total_tokens":199,"prompt_tokens_details":{"cached_tokens":0}}} === tool-auto-roundtrip === --- INPUT (POST chat, request.json) --- { "model": "zai-org/GLM-5.3", "messages": [ { "role": "user", "content": "Use the add_numbers tool to add 17 and 25. Do not answer in text." }, { "role": "assistant", "content": null, "tool_calls": [ { "id": "call_fe632e1f2031440c80fa6a0c", "type": "function", "function": { "name": "add_numbers", "arguments": "{\"a\": 17, \"b\": 25}" } } ] }, { "role": "tool", "tool_call_id": "call_fe632e1f2031440c80fa6a0c", "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, 1.8 s, pass=True) --- {"id":"fd3449e587024a7ba052f89e70ee9ae2","choices":[{"index":0,"message":{"content":"42","refusal":null,"role":"assistant"},"finish_reason":"stop","logprobs":null}],"created":1792329989,"model":"zai-org/GLM-5.3","object":"chat.completion","usage":{"prompt_tokens":55,"completion_tokens":2,"total_tokens":57,"prompt_tokens_details":{"cached_tokens":0}}}