Skip to content

Commit

Permalink
fix(beta): merge betas param with the default value (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stainless Bot authored and stainless-app[bot] committed Oct 15, 2024
1 parent 93d24c0 commit d713fcc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-c7baafa4b7d58ae2b830c0d5b89248e98421c8a7cf135b7e62e6e215fa94c7f4.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-b629ddf1f1f1473462fc9bdb605abd5b7be51c3ba91c34750cd46e8404aec356.yml
10 changes: 5 additions & 5 deletions src/resources/beta/messages/batches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Batches extends APIResource {
body,
...options,
headers: {
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
...options?.headers,
},
});
Expand Down Expand Up @@ -52,7 +52,7 @@ export class Batches extends APIResource {
return this._client.get(`/v1/messages/batches/${messageBatchId}?beta=true`, {
...options,
headers: {
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
...options?.headers,
},
});
Expand All @@ -78,7 +78,7 @@ export class Batches extends APIResource {
query,
...options,
headers: {
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
...options?.headers,
},
});
Expand Down Expand Up @@ -106,7 +106,7 @@ export class Batches extends APIResource {
return this._client.post(`/v1/messages/batches/${messageBatchId}/cancel?beta=true`, {
...options,
headers: {
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
...options?.headers,
},
});
Expand Down Expand Up @@ -149,7 +149,7 @@ export class Batches extends APIResource {
.get(batch.results_url, {
...options,
headers: {
'anthropic-beta': betas != null ? betas.toString() : 'message-batches-2024-09-24',
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
...options?.headers,
},
__binaryResponse: true,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/beta/prompt-caching/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class Messages extends APIResource {
timeout: (this._client as any)._options.timeout ?? 600000,
...options,
headers: {
'anthropic-beta': betas != null ? betas.toString() : 'prompt-caching-2024-07-31',
'anthropic-beta': [...(betas ?? []), 'prompt-caching-2024-07-31'].toString(),
...options?.headers,
},
stream: params.stream ?? false,
Expand Down

0 comments on commit d713fcc

Please sign in to comment.