diff --git a/.stats.yml b/.stats.yml index 70f28c76..150fc433 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/src/resources/beta/messages/batches.ts b/src/resources/beta/messages/batches.ts index 57e4c91c..0a1da3a1 100644 --- a/src/resources/beta/messages/batches.ts +++ b/src/resources/beta/messages/batches.ts @@ -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, }, }); @@ -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, }, }); @@ -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, }, }); @@ -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, }, }); @@ -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, diff --git a/src/resources/beta/prompt-caching/messages.ts b/src/resources/beta/prompt-caching/messages.ts index e2295e0b..a1b4c110 100644 --- a/src/resources/beta/prompt-caching/messages.ts +++ b/src/resources/beta/prompt-caching/messages.ts @@ -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,