Debian Codegraph @

tests/lib/_parse/__inline_snapshot__/test_messages/TestAsyncParse/d743d628-16aa-4c9f-ae78-51deb578f746.json

raw
1 [
2 {
3 "request": {
4 "method": "POST",
5 "url": "https://api.anthropic.com/v1/messages",
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": "AsyncAnthropic/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": "async:asyncio",
21 "anthropic-version": "2023-06-01",
22 "x-stainless-helper": "messages.parse",
23 "x-stainless-retry-count": "0",
24 "x-stainless-read-timeout": "600",
25 "content-length": "749"
26 },
27 "body": {
28 "max_tokens": 1024,
29 "messages": [
30 {
31 "role": "user",
32 "content": "Extract order: 2 Green Tea at $5.50 and 1 Coffee at $3.00. Total $14."
33 }
34 ],
35 "model": "claude-sonnet-4-5",
36 "output_config": {
37 "format": {
38 "schema": {
39 "$defs": {
40 "OrderItem": {
41 "type": "object",
42 "title": "OrderItem",
43 "properties": {
44 "product_name": {
45 "type": "string",
46 "title": "Product Name"
47 },
48 "price": {
49 "type": "number",
50 "title": "Price"
51 },
52 "quantity": {
53 "type": "integer",
54 "title": "Quantity"
55 }
56 },
57 "additionalProperties": false,
58 "required": [
59 "product_name",
60 "price",
61 "quantity"
62 ]
63 }
64 },
65 "type": "object",
66 "title": "OrderDetails",
67 "properties": {
68 "items": {
69 "type": "array",
70 "title": "Items",
71 "items": {
72 "$ref": "#/$defs/OrderItem"
73 }
74 },
75 "total": {
76 "type": "number",
77 "title": "Total"
78 }
79 },
80 "additionalProperties": false,
81 "required": [
82 "items",
83 "total"
84 ]
85 },
86 "type": "json_schema"
87 }
88 }
89 }
90 },
91 "response": {
92 "status_code": 429,
93 "headers": {
94 "content-type": "application/json",
95 "content-length": "606",
96 "connection": "keep-alive",
97 "x-should-retry": "true",
98 "x-robots-tag": "none",
99 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
100 "server": "cloudflare",
101 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
102 "cf-cache-status": "DYNAMIC"
103 },
104 "body": {
105 "type": "error",
106 "error": {
107 "type": "rate_limit_error",
108 "message": "This request would exceed your organization's rate limit of 20,000,000 prompt bytes per hour (org: 5576611f-a1ee-427c-9800-298d9579899c, model: claude-sonnet-4-5-20250929). For details, refer to: https://docs.claude.com/en/api/rate-limits. You can see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."
109 },
110 "request_id": "req_011CYK5mje9HkutJtmfPzzNC"
111 }
112 }
113 },
114 {
115 "request": {
116 "method": "POST",
117 "url": "https://api.anthropic.com/v1/messages",
118 "headers": {
119 "host": "api.anthropic.com",
120 "accept-encoding": "gzip, deflate",
121 "connection": "keep-alive",
122 "x-stainless-timeout": "600",
123 "accept": "application/json",
124 "content-type": "application/json",
125 "user-agent": "AsyncAnthropic/Python 0.82.0",
126 "x-stainless-lang": "python",
127 "x-stainless-package-version": "0.82.0",
128 "x-stainless-os": "MacOS",
129 "x-stainless-arch": "arm64",
130 "x-stainless-runtime": "CPython",
131 "x-stainless-runtime-version": "3.9.18",
132 "x-stainless-async": "async:asyncio",
133 "anthropic-version": "2023-06-01",
134 "x-stainless-helper": "messages.parse",
135 "x-stainless-retry-count": "1",
136 "x-stainless-read-timeout": "600",
137 "content-length": "749"
138 },
139 "body": {
140 "max_tokens": 1024,
141 "messages": [
142 {
143 "role": "user",
144 "content": "Extract order: 2 Green Tea at $5.50 and 1 Coffee at $3.00. Total $14."
145 }
146 ],
147 "model": "claude-sonnet-4-5",
148 "output_config": {
149 "format": {
150 "schema": {
151 "$defs": {
152 "OrderItem": {
153 "type": "object",
154 "title": "OrderItem",
155 "properties": {
156 "product_name": {
157 "type": "string",
158 "title": "Product Name"
159 },
160 "price": {
161 "type": "number",
162 "title": "Price"
163 },
164 "quantity": {
165 "type": "integer",
166 "title": "Quantity"
167 }
168 },
169 "additionalProperties": false,
170 "required": [
171 "product_name",
172 "price",
173 "quantity"
174 ]
175 }
176 },
177 "type": "object",
178 "title": "OrderDetails",
179 "properties": {
180 "items": {
181 "type": "array",
182 "title": "Items",
183 "items": {
184 "$ref": "#/$defs/OrderItem"
185 }
186 },
187 "total": {
188 "type": "number",
189 "title": "Total"
190 }
191 },
192 "additionalProperties": false,
193 "required": [
194 "items",
195 "total"
196 ]
197 },
198 "type": "json_schema"
199 }
200 }
201 }
202 },
203 "response": {
204 "status_code": 429,
205 "headers": {
206 "content-type": "application/json",
207 "content-length": "606",
208 "connection": "keep-alive",
209 "x-should-retry": "true",
210 "x-robots-tag": "none",
211 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
212 "server": "cloudflare",
213 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
214 "cf-cache-status": "DYNAMIC"
215 },
216 "body": {
217 "type": "error",
218 "error": {
219 "type": "rate_limit_error",
220 "message": "This request would exceed your organization's rate limit of 20,000,000 prompt bytes per hour (org: 5576611f-a1ee-427c-9800-298d9579899c, model: claude-sonnet-4-5-20250929). For details, refer to: https://docs.claude.com/en/api/rate-limits. You can see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase."
221 },
222 "request_id": "req_011CYK5mnscLpxFuMxiDHt26"
223 }
224 }
225 },
226 {
227 "request": {
228 "method": "POST",
229 "url": "https://api.anthropic.com/v1/messages",
230 "headers": {
231 "host": "api.anthropic.com",
232 "accept-encoding": "gzip, deflate",
233 "connection": "keep-alive",
234 "x-stainless-timeout": "600",
235 "accept": "application/json",
236 "content-type": "application/json",
237 "user-agent": "AsyncAnthropic/Python 0.82.0",
238 "x-stainless-lang": "python",
239 "x-stainless-package-version": "0.82.0",
240 "x-stainless-os": "MacOS",
241 "x-stainless-arch": "arm64",
242 "x-stainless-runtime": "CPython",
243 "x-stainless-runtime-version": "3.9.18",
244 "x-stainless-async": "async:asyncio",
245 "anthropic-version": "2023-06-01",
246 "x-stainless-helper": "messages.parse",
247 "x-stainless-retry-count": "2",
248 "x-stainless-read-timeout": "600",
249 "content-length": "749"
250 },
251 "body": {
252 "max_tokens": 1024,
253 "messages": [
254 {
255 "role": "user",
256 "content": "Extract order: 2 Green Tea at $5.50 and 1 Coffee at $3.00. Total $14."
257 }
258 ],
259 "model": "claude-sonnet-4-5",
260 "output_config": {
261 "format": {
262 "schema": {
263 "$defs": {
264 "OrderItem": {
265 "type": "object",
266 "title": "OrderItem",
267 "properties": {
268 "product_name": {
269 "type": "string",
270 "title": "Product Name"
271 },
272 "price": {
273 "type": "number",
274 "title": "Price"
275 },
276 "quantity": {
277 "type": "integer",
278 "title": "Quantity"
279 }
280 },
281 "additionalProperties": false,
282 "required": [
283 "product_name",
284 "price",
285 "quantity"
286 ]
287 }
288 },
289 "type": "object",
290 "title": "OrderDetails",
291 "properties": {
292 "items": {
293 "type": "array",
294 "title": "Items",
295 "items": {
296 "$ref": "#/$defs/OrderItem"
297 }
298 },
299 "total": {
300 "type": "number",
301 "title": "Total"
302 }
303 },
304 "additionalProperties": false,
305 "required": [
306 "items",
307 "total"
308 ]
309 },
310 "type": "json_schema"
311 }
312 }
313 }
314 },
315 "response": {
316 "status_code": 200,
317 "headers": {
318 "content-type": "application/json",
319 "connection": "keep-alive",
320 "x-robots-tag": "none",
321 "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
322 "server": "cloudflare",
323 "content-security-policy": "default-src 'none'; frame-ancestors 'none'",
324 "cf-cache-status": "DYNAMIC"
325 },
326 "body": {
327 "model": "claude-sonnet-4-5-20250929",
328 "id": "msg_01Q1NNiF8NA8EywFhxTmFbeP",
329 "type": "message",
330 "role": "assistant",
331 "content": [
332 {
333 "type": "text",
334 "text": "{\"items\":[{\"product_name\":\"Green Tea\",\"price\":5.50,\"quantity\":2},{\"product_name\":\"Coffee\",\"price\":3.00,\"quantity\":1}],\"total\":14.0}"
335 }
336 ],
337 "stop_reason": "end_turn",
338 "stop_sequence": null,
339 "usage": {
340 "input_tokens": 406,
341 "cache_creation_input_tokens": 0,
342 "cache_read_input_tokens": 0,
343 "cache_creation": {
344 "ephemeral_5m_input_tokens": 0,
345 "ephemeral_1h_input_tokens": 0
346 },
347 "output_tokens": 50,
348 "service_tier": "standard",
349 "inference_geo": "not_available"
350 }
351 }
352 }
353 }
354 ]