Debian Codegraph @

tests/lib/tools/__inline_snapshot__/test_runners/TestSyncRunTools/f59a9391-643b-422c-96dc-1f28bc7ea4d7.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.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": "BetaToolRunner",
23 "anthropic-beta": "structured-outputs-2025-12-15",
24 "x-stainless-retry-count": "0",
25 "x-stainless-read-timeout": "600",
26 "content-length": "598"
27 },
28 "body": {
29 "max_tokens": 1024,
30 "messages": [
31 {
32 "role": "user",
33 "content": "What's the weather in SF in Celsius?"
34 }
35 ],
36 "model": "claude-haiku-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 }
66 ]
67 }
68 },
69 "response": {
70 "status_code": 200,
71 "headers": {
72 "content-type": "application/json",
73 "connection": "keep-alive",
74 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
75 "server": "cloudflare",
76 "cf-cache-status": "DYNAMIC",
77 "x-robots-tag": "none",
78 "content-security-policy": "default-src 'none'; frame-ancestors 'none'"
79 },
80 "body": {
81 "model": "claude-haiku-4-5-20251001",
82 "id": "msg_01QCEBW49MBPHFuFwMDoFtPP",
83 "type": "message",
84 "role": "assistant",
85 "content": [
86 {
87 "type": "tool_use",
88 "id": "toolu_01GHndag5wQmbzNihYmV2UBj",
89 "name": "get_weather",
90 "input": {
91 "location": "San Francisco, CA",
92 "units": "c"
93 },
94 "caller": {
95 "type": "direct"
96 }
97 }
98 ],
99 "stop_reason": "tool_use",
100 "stop_sequence": null,
101 "usage": {
102 "input_tokens": 659,
103 "cache_creation_input_tokens": 0,
104 "cache_read_input_tokens": 0,
105 "cache_creation": {
106 "ephemeral_5m_input_tokens": 0,
107 "ephemeral_1h_input_tokens": 0
108 },
109 "output_tokens": 74,
110 "service_tier": "standard",
111 "inference_geo": "not_available"
112 }
113 }
114 }
115 },
116 {
117 "request": {
118 "method": "POST",
119 "url": "https://api.anthropic.com/v1/messages?beta=true",
120 "headers": {
121 "host": "api.anthropic.com",
122 "accept-encoding": "gzip, deflate",
123 "connection": "keep-alive",
124 "x-stainless-timeout": "600",
125 "accept": "application/json",
126 "content-type": "application/json",
127 "user-agent": "Anthropic/Python 0.82.0",
128 "x-stainless-lang": "python",
129 "x-stainless-package-version": "0.82.0",
130 "x-stainless-os": "MacOS",
131 "x-stainless-arch": "arm64",
132 "x-stainless-runtime": "CPython",
133 "x-stainless-runtime-version": "3.9.18",
134 "x-stainless-async": "false",
135 "anthropic-version": "2023-06-01",
136 "x-stainless-helper": "BetaToolRunner",
137 "anthropic-beta": "structured-outputs-2025-12-15",
138 "x-stainless-retry-count": "0",
139 "x-stainless-read-timeout": "600",
140 "content-length": "789"
141 },
142 "body": {
143 "max_tokens": 1024,
144 "messages": [
145 {
146 "role": "user",
147 "content": "What's the weather in SF in Celsius?"
148 },
149 {
150 "role": "user",
151 "content": [
152 {
153 "tool_use_id": "toolu_01GHndag5wQmbzNihYmV2UBj",
154 "content": "The weather in San Francisco, CA is currently sunny with a temperature of 20°C.",
155 "type": "tool_result"
156 }
157 ]
158 }
159 ],
160 "model": "claude-haiku-4-5",
161 "tools": [
162 {
163 "name": "get_weather",
164 "description": "Lookup the weather for a given city in either celsius or fahrenheit",
165 "input_schema": {
166 "additionalProperties": false,
167 "properties": {
168 "location": {
169 "description": "The city and state, e.g. San Francisco, CA",
170 "title": "Location",
171 "type": "string"
172 },
173 "units": {
174 "description": "Unit for the output, either 'c' for celsius or 'f' for fahrenheit",
175 "enum": [
176 "c",
177 "f"
178 ],
179 "title": "Units",
180 "type": "string"
181 }
182 },
183 "required": [
184 "location",
185 "units"
186 ],
187 "type": "object"
188 }
189 }
190 ]
191 }
192 },
193 "response": {
194 "status_code": 400,
195 "headers": {
196 "content-type": "application/json",
197 "content-length": "316",
198 "connection": "keep-alive",
199 "x-should-retry": "false",
200 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
201 "server": "cloudflare",
202 "cf-cache-status": "DYNAMIC",
203 "x-robots-tag": "none",
204 "content-security-policy": "default-src 'none'; frame-ancestors 'none'"
205 },
206 "body": {
207 "type": "error",
208 "error": {
209 "type": "invalid_request_error",
210 "message": "messages.0.content.1: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01GHndag5wQmbzNihYmV2UBj. Each `tool_result` block must have a corresponding `tool_use` block in the previous message."
211 },
212 "request_id": "req_011CYHyk9NPsBYeGbC9LuDNK"
213 }
214 }
215 }
216 ]