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: 561
10 host: ""
11 body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"anthropic/claude-sonnet-4","stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"reasoning":{"effort":"medium"},"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-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
28
29 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[{"type":"reasoning.text","text":"","signature":"","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
30
31 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":"The user is asking for","reasoning_details":[{"type":"reasoning.text","text":"The user is asking for","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
32
33 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" weather information for Florence, Italy. I have","reasoning_details":[{"type":"reasoning.text","text":" weather information for Florence, Italy. I have","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
34
35 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" a weather function available that takes","reasoning_details":[{"type":"reasoning.text","text":" a weather function available that takes","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
36
37 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" a location parameter. The","reasoning_details":[{"type":"reasoning.text","text":" a location parameter. The","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
38
39 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" user has provided the specific","reasoning_details":[{"type":"reasoning.text","text":" user has provided the specific","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
40
41 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" location \"Florence, Italy\" so","reasoning_details":[{"type":"reasoning.text","text":" location \"Florence, Italy\" so","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
42
43 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" I have all the required parameters to","reasoning_details":[{"type":"reasoning.text","text":" I have all the required parameters to","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
44
45 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":" make the function call.","reasoning_details":[{"type":"reasoning.text","text":" make the function call.","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
46
47 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[{"type":"reasoning.text","signature":"Eq0DCkYICBgCKkB2atvgnItYT73m/bhUANGG8tjfCxul+vY0g7SfNEDAgYkioHTPk+qo1xcapnLTuDzEd3CicghnBnSeQ/dBWVXoEgya5GX2XIC3kOKrG5caDIB9MmzFQK/34UUHfiIwllwF4InQp/zhfb+OgFuf9jKbh1SpsBK2K6PV8PB7cfb4+7k9qCM7yL7nmc2YGxsQKpQCTOA18tFgAY4dQX0FxgBJsWlVYEe3/TzSuM3jHkFuOF8u8Wgmjw5imqfKpF9ibWOjHPA6LjfD1CbsQKKv/0C7AzPyJsQ+p11pGZiSL1aASSMYCYjTLdi2Vv35wTQc7a0UngSHKtQ6ZahVvkd5y3JoZ7FMsdOtJQNCBu7ReJ+aicL4aVsZE0hrGIIDcKYyey/oyVjDyyfbQ3BwXdwTsb2i6BnW1KpzVSQSbqP3283WZUAKxygTWLas/DSHrHmZ6Bg2HiPcet/ZIdNnABVVJd90GLiZ6VpWKuLvYk9JYdUlYrhxbhwCcWGqRcL40TgtLAW3tjlLWXKHkVKmv35z8gJ1r6MAYGlpCToRfVvf5Ni2vrk/r5LYGAE=","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
48
49 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
50
51 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"id":"toolu_01J2NHBpWgZG12484BtrxsNF","index":0,"type":"function","function":{"name":"weather","arguments":""}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
52
53 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"type":"function","function":{"arguments":""}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
54
55 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"type":"function","function":{"arguments":"{\"locatio"}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
56
57 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"type":"function","function":{"arguments":"n\": \"Flor"}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
58
59 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"type":"function","function":{"arguments":"enc"}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
60
61 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"type":"function","function":{"arguments":"e,"}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
62
63 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"type":"function","function":{"arguments":" Italy\"}"}}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
64
65 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
66
67 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":"tool_calls","native_finish_reason":"tool_calls","logprobs":null}]}
68
69 data: {"id":"gen-1761052928-cSHiiIJW2besxl4lmO80","provider":"Anthropic","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052928,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":423,"completion_tokens":111,"total_tokens":534,"cost":0.002934,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.001269,"upstream_inference_completions_cost":0.001665},"completion_tokens_details":{"reasoning_tokens":65,"image_tokens":0}}}
70
71 data: [DONE]
72
73 headers:
74 Content-Type:
75 - text/event-stream
76 status: 200 OK
77 code: 200
78 duration: 1.876808709s
79- id: 1
80 request:
81 proto: HTTP/1.1
82 proto_major: 1
83 proto_minor: 1
84 content_length: 2047
85 host: ""
86 body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"toolu_01J2NHBpWgZG12484BtrxsNF","function":{"arguments":"{\"location\": \"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"format":"anthropic-claude-v1","index":0,"signature":"Eq0DCkYICBgCKkB2atvgnItYT73m/bhUANGG8tjfCxul+vY0g7SfNEDAgYkioHTPk+qo1xcapnLTuDzEd3CicghnBnSeQ/dBWVXoEgya5GX2XIC3kOKrG5caDIB9MmzFQK/34UUHfiIwllwF4InQp/zhfb+OgFuf9jKbh1SpsBK2K6PV8PB7cfb4+7k9qCM7yL7nmc2YGxsQKpQCTOA18tFgAY4dQX0FxgBJsWlVYEe3/TzSuM3jHkFuOF8u8Wgmjw5imqfKpF9ibWOjHPA6LjfD1CbsQKKv/0C7AzPyJsQ+p11pGZiSL1aASSMYCYjTLdi2Vv35wTQc7a0UngSHKtQ6ZahVvkd5y3JoZ7FMsdOtJQNCBu7ReJ+aicL4aVsZE0hrGIIDcKYyey/oyVjDyyfbQ3BwXdwTsb2i6BnW1KpzVSQSbqP3283WZUAKxygTWLas/DSHrHmZ6Bg2HiPcet/ZIdNnABVVJd90GLiZ6VpWKuLvYk9JYdUlYrhxbhwCcWGqRcL40TgtLAW3tjlLWXKHkVKmv35z8gJ1r6MAYGlpCToRfVvf5Ni2vrk/r5LYGAE=","text":"The user is asking for weather information for Florence, Italy. I have a weather function available that takes a location parameter. The user has provided the specific location \"Florence, Italy\" so I have all the required parameters to make the function call.","type":"reasoning.text"}],"reasoning":"The user is asking for weather information for Florence, Italy. I have a weather function available that takes a location parameter. The user has provided the specific location \"Florence, Italy\" so I have all the required parameters to make the function call."},{"content":"40 C","tool_call_id":"toolu_01J2NHBpWgZG12484BtrxsNF","role":"tool"}],"model":"anthropic/claude-sonnet-4","stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"reasoning":{"effort":"medium"},"usage":{"include":true},"stream":true}'
87 headers:
88 Accept:
89 - application/json
90 Content-Type:
91 - application/json
92 User-Agent:
93 - OpenAI/Go 2.7.1
94 url: https://openrouter.ai/api/v1/chat/completions
95 method: POST
96 response:
97 proto: HTTP/2.0
98 proto_major: 2
99 proto_minor: 0
100 content_length: -1
101 body: |+
102 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
103
104 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
105
106 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"The","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
107
108 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":" current","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
109
110 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":" weather in Florence, Italy is 40","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
111
112 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"°C (104°F). That","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
113
114 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"'s quite","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
115
116 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":" hot","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
117
118 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"! It's a very","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
119
120 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":" warm day there","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
121
122 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":".","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
123
124 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
125
126 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
127
128 data: {"id":"gen-1761052931-bQBfkvYvunOtBexaDWxh","provider":"Google","model":"anthropic/claude-sonnet-4","object":"chat.completion.chunk","created":1761052931,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":549,"completion_tokens":33,"total_tokens":582,"cost":0.002142,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.001647,"upstream_inference_completions_cost":0.000495},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
129
130 data: [DONE]
131
132 headers:
133 Content-Type:
134 - text/event-stream
135 status: 200 OK
136 code: 200
137 duration: 1.208550625s