Debian Codegraph @

tests/lib/tools/__inline_snapshot__/test_runners/TestSyncRunTools/771c64ff-a0af-4cd9-8080-a5a539da7cb9.json

raw
1 [
2 {
3 "request": {
4 "method": "POST",
5 "url": "https://api.anthropic.com/v1/messages?beta=true",
6 "headers": {
7 "host": "api.anthropic.com",
8 "accept-encoding": "gzip, deflate",
9 "connection": "keep-alive",
10 "x-stainless-timeout": "NOT_GIVEN",
11 "accept": "application/json",
12 "content-type": "application/json",
13 "user-agent": "Anthropic/Python 0.82.0",
14 "x-stainless-lang": "python",
15 "x-stainless-package-version": "0.82.0",
16 "x-stainless-os": "MacOS",
17 "x-stainless-arch": "arm64",
18 "x-stainless-runtime": "CPython",
19 "x-stainless-runtime-version": "3.9.18",
20 "x-stainless-async": "false",
21 "anthropic-version": "2023-06-01",
22 "x-stainless-helper-method": "stream",
23 "x-stainless-stream-helper": "beta.messages",
24 "x-stainless-helper": "BetaToolRunner",
25 "x-stainless-retry-count": "0",
26 "x-stainless-read-timeout": "600",
27 "content-length": "602"
28 },
29 "body": {
30 "max_tokens": 1024,
31 "messages": [
32 {
33 "role": "user",
34 "content": "What is the weather in SF?"
35 }
36 ],
37 "model": "claude-haiku-4-5",
38 "tools": [
39 {
40 "name": "get_weather",
41 "description": "Lookup the weather for a given city in either celsius or fahrenheit",
42 "input_schema": {
43 "additionalProperties": false,
44 "properties": {
45 "location": {
46 "description": "The city and state, e.g. San Francisco, CA",
47 "title": "Location",
48 "type": "string"
49 },
50 "units": {
51 "description": "Unit for the output, either 'c' for celsius or 'f' for fahrenheit",
52 "enum": [
53 "c",
54 "f"
55 ],
56 "title": "Units",
57 "type": "string"
58 }
59 },
60 "required": [
61 "location",
62 "units"
63 ],
64 "type": "object"
65 }
66 }
67 ],
68 "stream": true
69 }
70 },
71 "response": {
72 "status_code": 200,
73 "headers": {
74 "content-type": "text/event-stream; charset=utf-8",
75 "connection": "keep-alive",
76 "cache-control": "no-cache",
77 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
78 "server": "cloudflare",
79 "x-robots-tag": "none",
80 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
81 "cf-cache-status": "DYNAMIC"
82 },
83 "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-haiku-4-5-20251001\",\"id\":\"msg_01R4hRKPvDP3eyHsaAgs1gBn\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":656,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":26,\"service_tier\":\"standard\",\"inference_geo\":\"not_available\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01TJoxvFknVdnV9XpWFPaRmY\",\"name\":\"get_weather\",\"input\":{},\"caller\":{\"type\":\"direct\"}} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"location\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" \\\"San\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" Francisco, \"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"CA\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", \\\"units\\\": \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\"f\\\"}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":656,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":74} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n"
84 }
85 },
86 {
87 "request": {
88 "method": "POST",
89 "url": "https://api.anthropic.com/v1/messages?beta=true",
90 "headers": {
91 "host": "api.anthropic.com",
92 "accept-encoding": "gzip, deflate",
93 "connection": "keep-alive",
94 "x-stainless-timeout": "NOT_GIVEN",
95 "accept": "application/json",
96 "content-type": "application/json",
97 "user-agent": "Anthropic/Python 0.82.0",
98 "x-stainless-lang": "python",
99 "x-stainless-package-version": "0.82.0",
100 "x-stainless-os": "MacOS",
101 "x-stainless-arch": "arm64",
102 "x-stainless-runtime": "CPython",
103 "x-stainless-runtime-version": "3.9.18",
104 "x-stainless-async": "false",
105 "anthropic-version": "2023-06-01",
106 "x-stainless-helper-method": "stream",
107 "x-stainless-stream-helper": "beta.messages",
108 "x-stainless-helper": "BetaToolRunner",
109 "x-stainless-retry-count": "0",
110 "x-stainless-read-timeout": "600",
111 "content-length": "1001"
112 },
113 "body": {
114 "max_tokens": 1024,
115 "messages": [
116 {
117 "role": "user",
118 "content": "What is the weather in SF?"
119 },
120 {
121 "role": "assistant",
122 "content": [
123 {
124 "id": "toolu_01TJoxvFknVdnV9XpWFPaRmY",
125 "input": {
126 "location": "San Francisco, CA",
127 "units": "f"
128 },
129 "name": "get_weather",
130 "type": "tool_use",
131 "caller": {
132 "type": "direct"
133 }
134 }
135 ]
136 },
137 {
138 "role": "user",
139 "content": [
140 {
141 "type": "tool_result",
142 "tool_use_id": "toolu_01TJoxvFknVdnV9XpWFPaRmY",
143 "content": "{\"location\": \"San Francisco, CA\", \"temperature\": \"68\\u00b0F\", \"condition\": \"Sunny\"}"
144 }
145 ]
146 }
147 ],
148 "model": "claude-haiku-4-5",
149 "tools": [
150 {
151 "name": "get_weather",
152 "description": "Lookup the weather for a given city in either celsius or fahrenheit",
153 "input_schema": {
154 "additionalProperties": false,
155 "properties": {
156 "location": {
157 "description": "The city and state, e.g. San Francisco, CA",
158 "title": "Location",
159 "type": "string"
160 },
161 "units": {
162 "description": "Unit for the output, either 'c' for celsius or 'f' for fahrenheit",
163 "enum": [
164 "c",
165 "f"
166 ],
167 "title": "Units",
168 "type": "string"
169 }
170 },
171 "required": [
172 "location",
173 "units"
174 ],
175 "type": "object"
176 }
177 }
178 ],
179 "stream": true
180 }
181 },
182 "response": {
183 "status_code": 200,
184 "headers": {
185 "content-type": "text/event-stream; charset=utf-8",
186 "connection": "keep-alive",
187 "cache-control": "no-cache",
188 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
189 "server": "cloudflare",
190 "x-robots-tag": "none",
191 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
192 "cf-cache-status": "DYNAMIC"
193 },
194 "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"model\":\"claude-haiku-4-5-20251001\",\"id\":\"msg_0158JyopQTFaomteeJoDpS5q\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":770,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":8,\"service_tier\":\"standard\",\"inference_geo\":\"not_available\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"The weather in San Francisco, CA is\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" currently\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" **\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"68°F an\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"d Sunny**. It's\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" a nice\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" day!\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":770,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":27} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n"
195 }
196 }
197 ]