=== tool-named-openai === --- 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": false, "reasoning_effort": "none" } --- OUTPUT (HTTP 200, 2.6 s, pass=True) --- {"id":"63db63aa60db440b8262678cdb161d45","choices":[{"index":0,"message":{"content":null,"refusal":null,"tool_calls":[{"id":"call_69bf469014954269b7afd225","type":"function","function":{"name":"add_numbers","arguments":"{\"a\": 17, \"b\": 25}"}}],"role":"assistant"},"finish_reason":"tool_calls","logprobs":null}],"created":1792329983,"model":"zai-org/GLM-5.3","object":"chat.completion","usage":{"prompt_tokens":174,"completion_tokens":17,"total_tokens":191,"prompt_tokens_details":{"cached_tokens":128}}} === tool-named-openai-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_69bf469014954269b7afd225", "type": "function", "function": { "name": "add_numbers", "arguments": "{\"a\": 17, \"b\": 25}" } } ] }, { "role": "tool", "tool_call_id": "call_69bf469014954269b7afd225", "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, 2.5 s, pass=True) --- {"id":"116cde1a92e94998a8a735e7464ed288","choices":[{"index":0,"message":{"content":"42","refusal":null,"role":"assistant"},"finish_reason":"stop","logprobs":null}],"created":1792329986,"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}}}