diff --git a/packages/bedrock-sdk/src/client.ts b/packages/bedrock-sdk/src/client.ts index 523df8ba..952854d7 100644 --- a/packages/bedrock-sdk/src/client.ts +++ b/packages/bedrock-sdk/src/client.ts @@ -159,10 +159,10 @@ export class AnthropicBedrock extends Core.APIClient { } /** - * The Bedrock API does not currently support prompt caching or the Batch API. + * The Bedrock API does not currently support prompt caching, token counting or the Batch API. */ type BetaResource = Omit & { - messages: Omit; + messages: Omit; }; function makeBetaResource(client: AnthropicBedrock): BetaResource { @@ -174,5 +174,8 @@ function makeBetaResource(client: AnthropicBedrock): BetaResource { // @ts-expect-error we're deleting non-optional properties delete resource.messages.batches; + // @ts-expect-error we're deleting non-optional properties + delete resource.messages.countTokens; + return resource; } diff --git a/packages/vertex-sdk/src/client.ts b/packages/vertex-sdk/src/client.ts index 06231649..685be178 100644 --- a/packages/vertex-sdk/src/client.ts +++ b/packages/vertex-sdk/src/client.ts @@ -152,10 +152,10 @@ export class AnthropicVertex extends Core.APIClient { } /** - * The Vertex API does not currently support prompt caching or the Batch API. + * The Vertex API does not currently support prompt caching, token counting or the Batch API. */ type BetaResource = Omit & { - messages: Omit; + messages: Omit; }; function makeBetaResource(client: AnthropicVertex): BetaResource { @@ -167,5 +167,8 @@ function makeBetaResource(client: AnthropicVertex): BetaResource { // @ts-expect-error we're deleting non-optional properties delete resource.messages.batches; + // @ts-expect-error we're deleting non-optional properties + delete resource.messages.countTokens; + return resource; }