github.com/anthropics/anthropic-sdk-go@v1.70.1/toolrunner/testdata/cassettes/tool_runner_basic.yaml (about) 1 --- 2 version: 1 3 interactions: 4 - request: 5 body: '{"max_tokens":512,"messages":[{"content":[{"text":"What''s the weather 6 in San Francisco? Use fahrenheit.","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_01VLZuPg94y7NULJySZhEDJY","type":"message","role":"assistant","content":[{"type":"text","text":"I''ll 40 get the current weather in San Francisco for you in Fahrenheit."},{"type":"tool_use","id":"toolu_01TZR6ZrLHdpAWdmhVPuDfjQ","name":"get_weather","input":{"city":"San 41 Francisco","units":"fahrenheit"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":402,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":89,"service_tier":"standard"}}' 42 headers: 43 Anthropic-Organization-Id: 44 - 1577a8a6-174a-4705-916c-6b22ae7a49e6 45 Anthropic-Ratelimit-Input-Tokens-Limit: 46 - "200000" 47 Anthropic-Ratelimit-Input-Tokens-Remaining: 48 - "199000" 49 Anthropic-Ratelimit-Input-Tokens-Reset: 50 - "2025-10-30T16:17:36Z" 51 Anthropic-Ratelimit-Output-Tokens-Limit: 52 - "80000" 53 Anthropic-Ratelimit-Output-Tokens-Remaining: 54 - "80000" 55 Anthropic-Ratelimit-Output-Tokens-Reset: 56 - "2025-10-30T16:17:37Z" 57 Anthropic-Ratelimit-Requests-Limit: 58 - "4000" 59 Anthropic-Ratelimit-Requests-Remaining: 60 - "3997" 61 Anthropic-Ratelimit-Requests-Reset: 62 - "2025-10-30T16:17:35Z" 63 Anthropic-Ratelimit-Tokens-Limit: 64 - "280000" 65 Anthropic-Ratelimit-Tokens-Remaining: 66 - "279000" 67 Anthropic-Ratelimit-Tokens-Reset: 68 - "2025-10-30T16:17:36Z" 69 Cf-Cache-Status: 70 - DYNAMIC 71 Cf-Ray: 72 - 996c3946fe5f5e6a-EWR 73 Content-Type: 74 - application/json 75 Date: 76 - Thu, 30 Oct 2025 16:17:37 GMT 77 Request-Id: 78 - req_011CUdgeEZVNjY7M6qwNV9k6 79 Server: 80 - cloudflare 81 Strict-Transport-Security: 82 - max-age=31536000; includeSubDomains; preload 83 X-Envoy-Upstream-Service-Time: 84 - "1371" 85 X-Robots-Tag: 86 - none 87 status: 200 OK 88 code: 200 89 duration: "" 90 - request: 91 body: '{"max_tokens":512,"messages":[{"content":[{"text":"What''s the weather 92 in San Francisco? Use fahrenheit.","type":"text"}],"role":"user"},{"content":[{"text":"I''ll 93 get the current weather in San Francisco for you in Fahrenheit.","type":"text"},{"id":"toolu_01TZR6ZrLHdpAWdmhVPuDfjQ","input":{"city":"San 94 Francisco","units":"fahrenheit"},"name":"get_weather","type":"tool_use"}],"role":"assistant"},{"content":[{"tool_use_id":"toolu_01TZR6ZrLHdpAWdmhVPuDfjQ","content":[{"text":"The 95 weather in San Francisco is 68 degrees fahrenheit.","type":"text"}],"type":"tool_result"}],"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 96 weather"}]}' 97 form: {} 98 headers: 99 Accept: 100 - application/json 101 Anthropic-Version: 102 - "2023-06-01" 103 Content-Type: 104 - application/json 105 User-Agent: 106 - Anthropic/Go 1.16.0 107 X-Api-Key: 108 - fake-api-key-for-testing-only 109 X-Stainless-Arch: 110 - arm64 111 X-Stainless-Lang: 112 - go 113 X-Stainless-Os: 114 - MacOS 115 X-Stainless-Package-Version: 116 - 1.16.0 117 X-Stainless-Retry-Count: 118 - "0" 119 X-Stainless-Runtime: 120 - go 121 X-Stainless-Runtime-Version: 122 - go1.24.5 123 X-Stainless-Timeout: 124 - "600" 125 url: https://api.anthropic.com/v1/messages?beta=true 126 method: POST 127 response: 128 body: '{"model":"claude-3-7-sonnet-20250219","id":"msg_014SddXAzPYwR72fa37nJ8N2","type":"message","role":"assistant","content":[{"type":"text","text":"The 129 current temperature in San Francisco is 68 degrees Fahrenheit."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":514,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":19,"service_tier":"standard"}}' 130 headers: 131 Anthropic-Organization-Id: 132 - 1577a8a6-174a-4705-916c-6b22ae7a49e6 133 Anthropic-Ratelimit-Input-Tokens-Limit: 134 - "200000" 135 Anthropic-Ratelimit-Input-Tokens-Remaining: 136 - "199000" 137 Anthropic-Ratelimit-Input-Tokens-Reset: 138 - "2025-10-30T16:17:37Z" 139 Anthropic-Ratelimit-Output-Tokens-Limit: 140 - "80000" 141 Anthropic-Ratelimit-Output-Tokens-Remaining: 142 - "80000" 143 Anthropic-Ratelimit-Output-Tokens-Reset: 144 - "2025-10-30T16:17:37Z" 145 Anthropic-Ratelimit-Requests-Limit: 146 - "4000" 147 Anthropic-Ratelimit-Requests-Remaining: 148 - "3998" 149 Anthropic-Ratelimit-Requests-Reset: 150 - "2025-10-30T16:17:37Z" 151 Anthropic-Ratelimit-Tokens-Limit: 152 - "280000" 153 Anthropic-Ratelimit-Tokens-Remaining: 154 - "279000" 155 Anthropic-Ratelimit-Tokens-Reset: 156 - "2025-10-30T16:17:37Z" 157 Cf-Cache-Status: 158 - DYNAMIC 159 Cf-Ray: 160 - 996c394fc8465e6a-EWR 161 Content-Type: 162 - application/json 163 Date: 164 - Thu, 30 Oct 2025 16:17:38 GMT 165 Request-Id: 166 - req_011CUdgeLbdAHJifhfifciof 167 Server: 168 - cloudflare 169 Strict-Transport-Security: 170 - max-age=31536000; includeSubDomains; preload 171 X-Envoy-Upstream-Service-Time: 172 - "711" 173 X-Robots-Tag: 174 - none 175 status: 200 OK 176 code: 200 177 duration: ""