Debian Codegraph @

tests/lib/tools/__inline_snapshot__/test_runners/TestSyncRunTools/092be1de-d3f8-4c22-a4ea-a7ad54689836.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": "600",
11 "accept": "application/json",
12 "content-type": "application/json",
13 "user-agent": "Anthropic/Python 0.84.0",
14 "x-stainless-lang": "python",
15 "x-stainless-package-version": "0.84.0",
16 "x-stainless-os": "MacOS",
17 "x-stainless-arch": "arm64",
18 "x-stainless-runtime": "CPython",
19 "x-stainless-runtime-version": "3.12.6",
20 "x-stainless-async": "false",
21 "anthropic-version": "2023-06-01",
22 "x-stainless-helper": "BetaToolRunner",
23 "anthropic-beta": "structured-outputs-2025-12-15",
24 "x-stainless-retry-count": "0",
25 "x-stainless-read-timeout": "600",
26 "content-length": "660"
27 },
28 "body": {
29 "max_tokens": 1024,
30 "messages": [
31 {
32 "role": "user",
33 "content": "What is the weather in SF, NY, and London in Celsius?"
34 }
35 ],
36 "model": "claude-opus-4-5",
37 "tools": [
38 {
39 "name": "get_weather",
40 "description": "Lookup the weather for a given city in either celsius or fahrenheit",
41 "input_schema": {
42 "additionalProperties": false,
43 "properties": {
44 "location": {
45 "description": "The city and state, e.g. San Francisco, CA",
46 "title": "Location",
47 "type": "string"
48 },
49 "units": {
50 "description": "Unit for the output, either 'c' for celsius or 'f' for fahrenheit",
51 "enum": [
52 "c",
53 "f"
54 ],
55 "title": "Units",
56 "type": "string"
57 }
58 },
59 "required": [
60 "location",
61 "units"
62 ],
63 "type": "object"
64 },
65 "allowed_callers": [
66 "code_execution_20260120"
67 ]
68 }
69 ]
70 }
71 },
72 "response": {
73 "status_code": 200,
74 "headers": {
75 "content-type": "application/json",
76 "connection": "keep-alive",
77 "anthropic-ratelimit-input-tokens-limit": "30000",
78 "anthropic-ratelimit-input-tokens-remaining": "28000",
79 "anthropic-ratelimit-input-tokens-reset": "2026-02-25T20:02:37Z",
80 "anthropic-ratelimit-output-tokens-limit": "8000",
81 "anthropic-ratelimit-output-tokens-remaining": "8000",
82 "anthropic-ratelimit-output-tokens-reset": "2026-02-25T20:02:36Z",
83 "anthropic-ratelimit-requests-limit": "50",
84 "anthropic-ratelimit-requests-remaining": "49",
85 "anthropic-ratelimit-requests-reset": "2026-02-25T20:02:32Z",
86 "anthropic-ratelimit-tokens-limit": "38000",
87 "anthropic-ratelimit-tokens-remaining": "36000",
88 "anthropic-ratelimit-tokens-reset": "2026-02-25T20:02:36Z",
89 "x-robots-tag": "none",
90 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
91 "server": "cloudflare",
92 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
93 "cf-cache-status": "DYNAMIC"
94 },
95 "body": {
96 "model": "claude-opus-4-5-20251101",
97 "id": "msg_01LAwUK3MeXUxoNW5ZgnPpGy",
98 "type": "message",
99 "role": "assistant",
100 "content": [
101 {
102 "type": "text",
103 "text": "I'll check the weather for all three cities in Celsius simultaneously."
104 },
105 {
106 "type": "server_tool_use",
107 "id": "srvtoolu_017SzB73BSitzNFo1Xb3bq7S",
108 "name": "code_execution",
109 "input": {
110 "code": "import json\n\n# Get weather for all three cities in Celsius\nsf_weather = await get_weather({\"location\": \"San Francisco, CA\", \"units\": \"c\"})\nny_weather = await get_weather({\"location\": \"New York, NY\", \"units\": \"c\"})\nlondon_weather = await get_weather({\"location\": \"London, UK\", \"units\": \"c\"})\n\n# Parse and display results\nsf = json.loads(sf_weather)\nny = json.loads(ny_weather)\nlondon = json.loads(london_weather)\n\nprint(\"Weather in Celsius:\")\nprint(f\"San Francisco: {sf}\")\nprint(f\"New York: {ny}\")\nprint(f\"London: {london}\")\n"
111 },
112 "caller": {
113 "type": "direct"
114 }
115 },
116 {
117 "type": "tool_use",
118 "id": "toolu_011MDRpaZRMRRjtFkJizD6nS",
119 "name": "get_weather",
120 "input": {
121 "location": "San Francisco, CA",
122 "units": "c"
123 },
124 "caller": {
125 "type": "code_execution_20260120",
126 "tool_id": "srvtoolu_017SzB73BSitzNFo1Xb3bq7S"
127 }
128 }
129 ],
130 "container": {
131 "id": "container_011CYVPF4iP8oD6Vsz1NhVih",
132 "expires_at": "2026-02-25T20:07:37.475893Z"
133 },
134 "stop_reason": "tool_use",
135 "stop_sequence": null,
136 "usage": {
137 "input_tokens": 3182,
138 "cache_creation_input_tokens": 0,
139 "cache_read_input_tokens": 0,
140 "cache_creation": {
141 "ephemeral_5m_input_tokens": 0,
142 "ephemeral_1h_input_tokens": 0
143 },
144 "output_tokens": 237,
145 "service_tier": "standard",
146 "inference_geo": "not_available",
147 "server_tool_use": {
148 "web_search_requests": 0,
149 "web_fetch_requests": 0
150 }
151 }
152 }
153 }
154 },
155 {
156 "request": {
157 "method": "POST",
158 "url": "https://api.anthropic.com/v1/messages?beta=true",
159 "headers": {
160 "host": "api.anthropic.com",
161 "accept-encoding": "gzip, deflate",
162 "connection": "keep-alive",
163 "x-stainless-timeout": "600",
164 "accept": "application/json",
165 "content-type": "application/json",
166 "user-agent": "Anthropic/Python 0.84.0",
167 "x-stainless-lang": "python",
168 "x-stainless-package-version": "0.84.0",
169 "x-stainless-os": "MacOS",
170 "x-stainless-arch": "arm64",
171 "x-stainless-runtime": "CPython",
172 "x-stainless-runtime-version": "3.12.6",
173 "x-stainless-async": "false",
174 "anthropic-version": "2023-06-01",
175 "x-stainless-helper": "BetaToolRunner",
176 "anthropic-beta": "structured-outputs-2025-12-15",
177 "x-stainless-retry-count": "0",
178 "x-stainless-read-timeout": "600",
179 "content-length": "1978"
180 },
181 "body": {
182 "max_tokens": 1024,
183 "messages": [
184 {
185 "role": "user",
186 "content": "What is the weather in SF, NY, and London in Celsius?"
187 },
188 {
189 "role": "assistant",
190 "content": [
191 {
192 "text": "I'll check the weather for all three cities in Celsius simultaneously.",
193 "type": "text"
194 },
195 {
196 "id": "srvtoolu_017SzB73BSitzNFo1Xb3bq7S",
197 "input": {
198 "code": "import json\n\n# Get weather for all three cities in Celsius\nsf_weather = await get_weather({\"location\": \"San Francisco, CA\", \"units\": \"c\"})\nny_weather = await get_weather({\"location\": \"New York, NY\", \"units\": \"c\"})\nlondon_weather = await get_weather({\"location\": \"London, UK\", \"units\": \"c\"})\n\n# Parse and display results\nsf = json.loads(sf_weather)\nny = json.loads(ny_weather)\nlondon = json.loads(london_weather)\n\nprint(\"Weather in Celsius:\")\nprint(f\"San Francisco: {sf}\")\nprint(f\"New York: {ny}\")\nprint(f\"London: {london}\")\n"
199 },
200 "name": "code_execution",
201 "type": "server_tool_use",
202 "caller": {
203 "type": "direct"
204 }
205 },
206 {
207 "id": "toolu_011MDRpaZRMRRjtFkJizD6nS",
208 "input": {
209 "location": "San Francisco, CA",
210 "units": "c"
211 },
212 "name": "get_weather",
213 "type": "tool_use",
214 "caller": {
215 "tool_id": "srvtoolu_017SzB73BSitzNFo1Xb3bq7S",
216 "type": "code_execution_20260120"
217 }
218 }
219 ]
220 },
221 {
222 "role": "user",
223 "content": [
224 {
225 "type": "tool_result",
226 "tool_use_id": "toolu_011MDRpaZRMRRjtFkJizD6nS",
227 "content": "{\"location\": \"San Francisco, CA\", \"temperature\": \"20\\u00b0C\", \"condition\": \"Sunny\"}"
228 }
229 ]
230 }
231 ],
232 "model": "claude-opus-4-5",
233 "container": "container_011CYVPF4iP8oD6Vsz1NhVih",
234 "tools": [
235 {
236 "name": "get_weather",
237 "description": "Lookup the weather for a given city in either celsius or fahrenheit",
238 "input_schema": {
239 "additionalProperties": false,
240 "properties": {
241 "location": {
242 "description": "The city and state, e.g. San Francisco, CA",
243 "title": "Location",
244 "type": "string"
245 },
246 "units": {
247 "description": "Unit for the output, either 'c' for celsius or 'f' for fahrenheit",
248 "enum": [
249 "c",
250 "f"
251 ],
252 "title": "Units",
253 "type": "string"
254 }
255 },
256 "required": [
257 "location",
258 "units"
259 ],
260 "type": "object"
261 },
262 "allowed_callers": [
263 "code_execution_20260120"
264 ]
265 }
266 ]
267 }
268 },
269 "response": {
270 "status_code": 200,
271 "headers": {
272 "content-type": "application/json",
273 "connection": "keep-alive",
274 "x-robots-tag": "none",
275 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
276 "server": "cloudflare",
277 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
278 "cf-cache-status": "DYNAMIC"
279 },
280 "body": {
281 "model": "claude-opus-4-5-20251101",
282 "id": "msg_0147NV7w8PyZ6bSUsNY79cYj",
283 "type": "message",
284 "role": "assistant",
285 "content": [
286 {
287 "type": "tool_use",
288 "id": "toolu_01RXQDRjwv5Un7n98xFahjo8",
289 "name": "get_weather",
290 "input": {
291 "location": "New York, NY",
292 "units": "c"
293 },
294 "caller": {
295 "type": "code_execution_20260120",
296 "tool_id": "srvtoolu_017SzB73BSitzNFo1Xb3bq7S"
297 }
298 }
299 ],
300 "container": {
301 "id": "container_011CYVPF4iP8oD6Vsz1NhVih",
302 "expires_at": "2026-02-25T20:07:39.078916Z"
303 },
304 "stop_reason": "tool_use",
305 "stop_sequence": null,
306 "usage": {
307 "input_tokens": 0,
308 "output_tokens": 0,
309 "server_tool_use": {
310 "web_search_requests": 0,
311 "web_fetch_requests": 0
312 }
313 }
314 }
315 }
316 }
317 ]