Skip to content

Commit d713fcc

Browse files
Stainless Botstainless-app[bot]
authored andcommitted
fix(beta): merge betas param with the default value (#556)
1 parent 93d24c0 commit d713fcc

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 9
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-c7baafa4b7d58ae2b830c0d5b89248e98421c8a7cf135b7e62e6e215fa94c7f4.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-b629ddf1f1f1473462fc9bdb605abd5b7be51c3ba91c34750cd46e8404aec356.yml

src/resources/beta/messages/batches.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Batches extends APIResource {
2323
body,
2424
...options,
2525
headers: {
26-
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
26+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
2727
...options?.headers,
2828
},
2929
});
@@ -52,7 +52,7 @@ export class Batches extends APIResource {
5252
return this._client.get(`/v1/messages/batches/${messageBatchId}?beta=true`, {
5353
...options,
5454
headers: {
55-
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
55+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
5656
...options?.headers,
5757
},
5858
});
@@ -78,7 +78,7 @@ export class Batches extends APIResource {
7878
query,
7979
...options,
8080
headers: {
81-
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
81+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
8282
...options?.headers,
8383
},
8484
});
@@ -106,7 +106,7 @@ export class Batches extends APIResource {
106106
return this._client.post(`/v1/messages/batches/${messageBatchId}/cancel?beta=true`, {
107107
...options,
108108
headers: {
109-
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
109+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
110110
...options?.headers,
111111
},
112112
});
@@ -149,7 +149,7 @@ export class Batches extends APIResource {
149149
.get(batch.results_url, {
150150
...options,
151151
headers: {
152-
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
152+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
153153
...options?.headers,
154154
},
155155
__binaryResponse: true,

src/resources/beta/prompt-caching/messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class Messages extends APIResource {
3939
timeout: (this._client as any)._options.timeout ?? 600000,
4040
...options,
4141
headers: {
42-
'anthropic-beta': betas != null ? betas.toString() : 'prompt-caching-2024-07-31',
42+
'anthropic-beta': [...(betas ?? []), 'prompt-caching-2024-07-31'].toString(),
4343
...options?.headers,
4444
},
4545
stream: params.stream ?? false,

0 commit comments

Comments
 (0)