multi_tool_streaming.yaml

 1---
 2version: 2
 3interactions:
 4- id: 0
 5  request:
 6    proto: HTTP/1.1
 7    proto_major: 1
 8    proto_minor: 1
 9    content_length: 894
10    host: ""
11    body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"}],"model":"google/gemini-3-pro-preview","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"usage":{"include":true},"stream":true}'
12    headers:
13      Accept:
14      - application/json
15      Content-Type:
16      - application/json
17      User-Agent:
18      - OpenAI/Go 2.7.1
19    url: https://openrouter.ai/api/v1/chat/completions
20    method: POST
21  response:
22    proto: HTTP/2.0
23    proto_major: 2
24    proto_minor: 0
25    content_length: -1
26    body: |+
27      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":"**Initiating Operations Concurrently**\n\nI've got the directive to execute both 'add' and 'multiply' operations on the provided numbers, 2 and 3. The system prompt is clear: both must be used. Now I am formulating the concurrent calls to 'add' and 'multiply', as requested.\n\n\n","reasoning_details":[{"type":"reasoning.text","text":"**Initiating Operations Concurrently**\n\nI've got the directive to execute both 'add' and 'multiply' operations on the provided numbers, 2 and 3. The system prompt is clear: both must be used. Now I am formulating the concurrent calls to 'add' and 'multiply', as requested.\n\n\n","format":"google-gemini-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}
28
29      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":"**Constructing Tool Calls**\n\nI'm solidifying the implementation strategy. My current focus is generating a list containing the `add` and `multiply` function calls, both operating on the inputs 2 and 3, as I previously planned. That list is now ready for execution.\n\n\n","reasoning_details":[{"type":"reasoning.text","text":"**Constructing Tool Calls**\n\nI'm solidifying the implementation strategy. My current focus is generating a list containing the `add` and `multiply` function calls, both operating on the inputs 2 and 3, as I previously planned. That list is now ready for execution.\n\n\n","format":"google-gemini-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}
30
31      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":null,"reasoning_details":[{"type":"reasoning.encrypted","data":"CiQBjz1rX8jwTvOiEkSdffMAbbZb3AAf8J6TRL+sv+cWElPrf1UKZwGPPWtfWNRRPkLCDBabDP5oo0WMzTrSFtbdqfv71+er3owJmWicmo4eIEWcKo18eDA4FrV4UvfwEU/bTdRZik97eIfZTzKLFj2pZMnFdF6mr/9R1YQ6QDK01Gab7ojW4nrSn6O+mLkKZAGPPWtfGne8v/7fOrodXKtnOK8O/KmqnZwQMoUNkP/Nxsy7f4vcegXjk421zmJ/9dNiCd2W/9AXGZkgCLYZoZESC9056TnLcfiwRMOH+JxTpOK9pbWcDPx5s8QJkVWUT+2Aq8sKrgEBjz1rX0DeTAqlLohJ1Nh4BFPPhmEtrrLKP39s++nYc+0k2CWDmI8XcvPsfXuIKGQFIG60fUn0CANPDjWtnWOI7CkwAe/iuzO0oul1sr8yebW0ucuN9JtPzhCKFLgCoydZ+YmiEqeA2m/+0UWfX687eNUODu2Zb4snWbZcx+vF0mS2rhzKpSktfgFJtc7z/A+/uPrsSCN8fIx0zH0bJuc2tMU03zr5XsBo5MtrO+AKYgGPPWtfx94NLyXU91eymKkmuKLgGkZ/tBK366wzvwLkopNlbJcoYDXBvZKE9ixmX+jyjP46RzftAmBusOOG8Z4TrGzUXld7fN+eAb5QIEKP7BegRq4KCco9wYqehjEuq+ZwCkIBjz1rX4NMJ6Fb+Vytwp7qSprS8/sBuNyrUT3ryumRgPlYFVhOTo6QEdjavg2ik1QvCHSX+PvIZHBqKoLAJ88znEg=","format":"google-gemini-v1","id":"tool_add_pBo1amaXosQZHph2sTIn","index":0}]},"finish_reason":null,"native_finish_reason":null}]}
32
33      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"id":"tool_add_pBo1amaXosQZHph2sTIn","type":"function","function":{"name":"add","arguments":""}}]},"finish_reason":null,"native_finish_reason":null}]}
34
35      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"{\"a\":2,\"b\":3}"}}]},"finish_reason":null,"native_finish_reason":null}]}
36
37      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":1,"id":"tool_multiply_4OlsV1nHAV6rIa96boyX","type":"function","function":{"name":"multiply","arguments":""}}]},"finish_reason":null,"native_finish_reason":null}]}
38
39      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":1,"function":{"arguments":"{\"b\":3,\"a\":2}"}}]},"finish_reason":null,"native_finish_reason":null}]}
40
41      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":null},"finish_reason":"tool_calls","native_finish_reason":"STOP"}]}
42
43      data: {"id":"gen-1773324016-ju6o6zsDAama1Oyl2svH","object":"chat.completion.chunk","created":1773324016,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[],"usage":{"prompt_tokens":57,"completion_tokens":121,"total_tokens":178,"cost":0.001566,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.001566,"upstream_inference_prompt_cost":0.000114,"upstream_inference_completions_cost":0.001452},"completion_tokens_details":{"reasoning_tokens":103,"image_tokens":0,"audio_tokens":0}}}
44
45      data: [DONE]
46
47    headers:
48      Content-Type:
49      - text/event-stream
50    status: 200 OK
51    code: 200
52    duration: 5.262496708s
53- id: 1
54  request:
55    proto: HTTP/1.1
56    proto_major: 1
57    proto_minor: 1
58    content_length: 2881
59    host: ""
60    body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"},{"tool_calls":[{"id":"tool_add_pBo1amaXosQZHph2sTIn","function":{"arguments":"{\"a\":2,\"b\":3}","name":"add"},"type":"function"},{"id":"tool_multiply_4OlsV1nHAV6rIa96boyX","function":{"arguments":"{\"b\":3,\"a\":2}","name":"multiply"},"type":"function"}],"role":"assistant","reasoning_details":[{"format":"google-gemini-v1","index":0,"text":"**Initiating Operations Concurrently**\n\nI''ve got the directive to execute both ''add'' and ''multiply'' operations on the provided numbers, 2 and 3. The system prompt is clear: both must be used. Now I am formulating the concurrent calls to ''add'' and ''multiply'', as requested.\n\n\n**Constructing Tool Calls**\n\nI''m solidifying the implementation strategy. My current focus is generating a list containing the `add` and `multiply` function calls, both operating on the inputs 2 and 3, as I previously planned. That list is now ready for execution.\n\n\n","type":"reasoning.text"},{"data":"CiQBjz1rX8jwTvOiEkSdffMAbbZb3AAf8J6TRL+sv+cWElPrf1UKZwGPPWtfWNRRPkLCDBabDP5oo0WMzTrSFtbdqfv71+er3owJmWicmo4eIEWcKo18eDA4FrV4UvfwEU/bTdRZik97eIfZTzKLFj2pZMnFdF6mr/9R1YQ6QDK01Gab7ojW4nrSn6O+mLkKZAGPPWtfGne8v/7fOrodXKtnOK8O/KmqnZwQMoUNkP/Nxsy7f4vcegXjk421zmJ/9dNiCd2W/9AXGZkgCLYZoZESC9056TnLcfiwRMOH+JxTpOK9pbWcDPx5s8QJkVWUT+2Aq8sKrgEBjz1rX0DeTAqlLohJ1Nh4BFPPhmEtrrLKP39s++nYc+0k2CWDmI8XcvPsfXuIKGQFIG60fUn0CANPDjWtnWOI7CkwAe/iuzO0oul1sr8yebW0ucuN9JtPzhCKFLgCoydZ+YmiEqeA2m/+0UWfX687eNUODu2Zb4snWbZcx+vF0mS2rhzKpSktfgFJtc7z/A+/uPrsSCN8fIx0zH0bJuc2tMU03zr5XsBo5MtrO+AKYgGPPWtfx94NLyXU91eymKkmuKLgGkZ/tBK366wzvwLkopNlbJcoYDXBvZKE9ixmX+jyjP46RzftAmBusOOG8Z4TrGzUXld7fN+eAb5QIEKP7BegRq4KCco9wYqehjEuq+ZwCkIBjz1rX4NMJ6Fb+Vytwp7qSprS8/sBuNyrUT3ryumRgPlYFVhOTo6QEdjavg2ik1QvCHSX+PvIZHBqKoLAJ88znEg=","format":"google-gemini-v1","id":"tool_add_pBo1amaXosQZHph2sTIn","index":0,"type":"reasoning.encrypted"}]},{"content":"5","tool_call_id":"tool_add_pBo1amaXosQZHph2sTIn","role":"tool"},{"content":"6","tool_call_id":"tool_multiply_4OlsV1nHAV6rIa96boyX","role":"tool"}],"model":"google/gemini-3-pro-preview","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"usage":{"include":true},"stream":true}'
61    headers:
62      Accept:
63      - application/json
64      Content-Type:
65      - application/json
66      User-Agent:
67      - OpenAI/Go 2.7.1
68    url: https://openrouter.ai/api/v1/chat/completions
69    method: POST
70  response:
71    proto: HTTP/2.0
72    proto_major: 2
73    proto_minor: 0
74    content_length: -1
75    body: |+
76      data: {"id":"gen-1773324023-7FoX7Fe6AT4zEtGIZMt7","object":"chat.completion.chunk","created":1773324023,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"The result","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
77
78      data: {"id":"gen-1773324023-7FoX7Fe6AT4zEtGIZMt7","object":"chat.completion.chunk","created":1773324023,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":" of adding 2 and 3 is 5, and the result of multiplying ","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
79
80      data: {"id":"gen-1773324023-7FoX7Fe6AT4zEtGIZMt7","object":"chat.completion.chunk","created":1773324023,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"2 by 3 is 6.","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
81
82      data: {"id":"gen-1773324023-7FoX7Fe6AT4zEtGIZMt7","object":"chat.completion.chunk","created":1773324023,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"STOP"}]}
83
84      data: {"id":"gen-1773324023-7FoX7Fe6AT4zEtGIZMt7","object":"chat.completion.chunk","created":1773324023,"model":"google/gemini-3-pro-preview-20251117","provider":"Google","choices":[],"usage":{"prompt_tokens":106,"completion_tokens":27,"total_tokens":133,"cost":0.000536,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.000536,"upstream_inference_prompt_cost":0.000212,"upstream_inference_completions_cost":0.000324},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
85
86      data: [DONE]
87
88    headers:
89      Content-Type:
90      - text/event-stream
91    status: 200 OK
92    code: 200
93    duration: 4.543200542s