(call int)
| 189 | } |
| 190 | |
| 191 | func (ms *mockUpstream) responseForCall(call int) upstreamResponse { |
| 192 | if call >= len(ms.responses) { |
| 193 | if ms.AllowOverflow { |
| 194 | return ms.responses[len(ms.responses)-1] |
| 195 | } |
| 196 | ms.t.Fatalf("unexpected number of calls: %v, got only %v responses", call, len(ms.responses)) |
| 197 | } |
| 198 | return ms.responses[call] |
| 199 | } |
| 200 | |
| 201 | func isStreaming(body []byte, urlPath string) bool { |
| 202 | // The Anthropic SDK's Bedrock middleware extracts "stream" |