Debian Codegraph @

toolrunner/testdata/cassettes/tool_runner_custom_handling.yaml

raw
1 ---
2 version: 1
3 interactions:
4 - request:
5 body: '{"max_tokens":512,"messages":[{"content":[{"text":"What''s the weather
6 in SF in celsius?","type":"text"}],"role":"user"}],"model":"claude-3-7-sonnet-latest","tools":[{"input_schema":{"properties":{"city":{"type":"string"},"units":{"enum":["celsius","fahrenheit"],"type":"string"}},"required":["city"],"type":"object"},"name":"get_weather","description":"Get
7 weather"}]}'
8 form: {}
9 headers:
10 Accept:
11 - application/json
12 Anthropic-Version:
13 - "2023-06-01"
14 Content-Type:
15 - application/json
16 User-Agent:
17 - Anthropic/Go 1.16.0
18 X-Api-Key:
19 - fake-api-key-for-testing-only
20 X-Stainless-Arch:
21 - arm64
22 X-Stainless-Lang:
23 - go
24 X-Stainless-Os:
25 - MacOS
26 X-Stainless-Package-Version:
27 - 1.16.0
28 X-Stainless-Retry-Count:
29 - "0"
30 X-Stainless-Runtime:
31 - go
32 X-Stainless-Runtime-Version:
33 - go1.24.5
34 X-Stainless-Timeout:
35 - "600"
36 url: https://api.anthropic.com/v1/messages?beta=true
37 method: POST
38 response:
39 body: '{"model":"claude-3-7-sonnet-20250219","id":"msg_01SKjgb16h4feir85VSwDQY3","type":"message","role":"assistant","content":[{"type":"text","text":"I''ll
40 check the current weather in San Francisco for you in Celsius."},{"type":"tool_use","id":"toolu_01RemJnygsv2MuzBdGC1Amou","name":"get_weather","input":{"city":"SF","units":"celsius"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":399,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":86,"service_tier":"standard"}}'
41 headers:
42 Anthropic-Organization-Id:
43 - 1577a8a6-174a-4705-916c-6b22ae7a49e6
44 Anthropic-Ratelimit-Input-Tokens-Limit:
45 - "200000"
46 Anthropic-Ratelimit-Input-Tokens-Remaining:
47 - "199000"
48 Anthropic-Ratelimit-Input-Tokens-Reset:
49 - "2025-10-30T16:17:36Z"
50 Anthropic-Ratelimit-Output-Tokens-Limit:
51 - "80000"
52 Anthropic-Ratelimit-Output-Tokens-Remaining:
53 - "80000"
54 Anthropic-Ratelimit-Output-Tokens-Reset:
55 - "2025-10-30T16:17:37Z"
56 Anthropic-Ratelimit-Requests-Limit:
57 - "4000"
58 Anthropic-Ratelimit-Requests-Remaining:
59 - "3995"
60 Anthropic-Ratelimit-Requests-Reset:
61 - "2025-10-30T16:17:35Z"
62 Anthropic-Ratelimit-Tokens-Limit:
63 - "280000"
64 Anthropic-Ratelimit-Tokens-Remaining:
65 - "279000"
66 Anthropic-Ratelimit-Tokens-Reset:
67 - "2025-10-30T16:17:36Z"
68 Cf-Cache-Status:
69 - DYNAMIC
70 Cf-Ray:
71 - 996c3946fe625e6a-EWR
72 Content-Type:
73 - application/json
74 Date:
75 - Thu, 30 Oct 2025 16:17:37 GMT
76 Request-Id:
77 - req_011CUdgeEayGXg3uus6w2iF3
78 Server:
79 - cloudflare
80 Strict-Transport-Security:
81 - max-age=31536000; includeSubDomains; preload
82 X-Envoy-Upstream-Service-Time:
83 - "1330"
84 X-Robots-Tag:
85 - none
86 status: 200 OK
87 code: 200
88 duration: ""
89 - request:
90 body: '{"max_tokens":512,"messages":[{"content":[{"text":"What''s the weather
91 in SF in celsius?","type":"text"}],"role":"user"},{"content":[{"text":"I''ll
92 check the current weather in San Francisco for you in Celsius.","type":"text"},{"id":"toolu_01RemJnygsv2MuzBdGC1Amou","input":{"city":"SF","units":"celsius"},"name":"get_weather","type":"tool_use"}],"role":"assistant"},{"content":[{"tool_use_id":"toolu_01RemJnygsv2MuzBdGC1Amou","content":[{"text":"Celsius
93 20°C","type":"text"}],"type":"tool_result"}],"role":"user"}],"model":"claude-3-7-sonnet-latest","tools":[]}'
94 form: {}
95 headers:
96 Accept:
97 - application/json
98 Anthropic-Version:
99 - "2023-06-01"
100 Content-Type:
101 - application/json
102 User-Agent:
103 - Anthropic/Go 1.16.0
104 X-Api-Key:
105 - fake-api-key-for-testing-only
106 X-Stainless-Arch:
107 - arm64
108 X-Stainless-Lang:
109 - go
110 X-Stainless-Os:
111 - MacOS
112 X-Stainless-Package-Version:
113 - 1.16.0
114 X-Stainless-Retry-Count:
115 - "0"
116 X-Stainless-Runtime:
117 - go
118 X-Stainless-Runtime-Version:
119 - go1.24.5
120 X-Stainless-Timeout:
121 - "600"
122 url: https://api.anthropic.com/v1/messages?beta=true
123 method: POST
124 response:
125 body: '{"model":"claude-3-7-sonnet-20250219","id":"msg_01AotAbnCJmEFVVkkw6rNfXP","type":"message","role":"assistant","content":[{"type":"text","text":"It''s
126 currently 20°C in San Francisco."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":119,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":15,"service_tier":"standard"}}'
127 headers:
128 Anthropic-Organization-Id:
129 - 1577a8a6-174a-4705-916c-6b22ae7a49e6
130 Anthropic-Ratelimit-Input-Tokens-Limit:
131 - "200000"
132 Anthropic-Ratelimit-Input-Tokens-Remaining:
133 - "199000"
134 Anthropic-Ratelimit-Input-Tokens-Reset:
135 - "2025-10-30T16:17:37Z"
136 Anthropic-Ratelimit-Output-Tokens-Limit:
137 - "80000"
138 Anthropic-Ratelimit-Output-Tokens-Remaining:
139 - "80000"
140 Anthropic-Ratelimit-Output-Tokens-Reset:
141 - "2025-10-30T16:17:38Z"
142 Anthropic-Ratelimit-Requests-Limit:
143 - "4000"
144 Anthropic-Ratelimit-Requests-Remaining:
145 - "3999"
146 Anthropic-Ratelimit-Requests-Reset:
147 - "2025-10-30T16:17:37Z"
148 Anthropic-Ratelimit-Tokens-Limit:
149 - "280000"
150 Anthropic-Ratelimit-Tokens-Remaining:
151 - "279000"
152 Anthropic-Ratelimit-Tokens-Reset:
153 - "2025-10-30T16:17:37Z"
154 Cf-Cache-Status:
155 - DYNAMIC
156 Cf-Ray:
157 - 996c394f88085e6a-EWR
158 Content-Type:
159 - application/json
160 Date:
161 - Thu, 30 Oct 2025 16:17:38 GMT
162 Request-Id:
163 - req_011CUdgeLTSmFd3yzdcPJc5d
164 Server:
165 - cloudflare
166 Strict-Transport-Security:
167 - max-age=31536000; includeSubDomains; preload
168 X-Envoy-Upstream-Service-Time:
169 - "788"
170 X-Robots-Tag:
171 - none
172 status: 200 OK
173 code: 200
174 duration: ""