We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c128ce7 commit 4523ca9Copy full SHA for 4523ca9
packages/bedrock-sdk/src/client.ts
@@ -117,6 +117,12 @@ export class AnthropicBedrock extends Core.APIClient {
117
} {
118
options.__streamClass = Stream;
119
120
+ if (Core.isObj(options.body)) {
121
+ // create a shallow copy of the request body so that code that mutates it later
122
+ // doesn't mutate the original user-provided object
123
+ options.body = { ...options.body };
124
+ }
125
+
126
if (Core.isObj(options.body)) {
127
if (!options.body['anthropic_version']) {
128
options.body['anthropic_version'] = DEFAULT_VERSION;
0 commit comments