From 3eac9b04de23a5a3df3d68ed2bf35ceeb4fa7c7a Mon Sep 17 00:00:00 2001 From: Jack Reinhardt <187697449+jackrein@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:40:39 -0800 Subject: [PATCH] fix(bedrock): add sts userAgentAppId (#7719) --- .changeset/flat-swans-notice.md | 5 +++++ src/core/api/providers/bedrock.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/flat-swans-notice.md diff --git a/.changeset/flat-swans-notice.md b/.changeset/flat-swans-notice.md new file mode 100644 index 00000000..873febaf --- /dev/null +++ b/.changeset/flat-swans-notice.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add sts client userAgentAppId diff --git a/src/core/api/providers/bedrock.ts b/src/core/api/providers/bedrock.ts index 1491a9d0..3da0969e 100644 --- a/src/core/api/providers/bedrock.ts +++ b/src/core/api/providers/bedrock.ts @@ -104,6 +104,7 @@ interface CachePointContentBlock { // Define provider options type based on AWS SDK patterns interface ProviderChainOptions { + clientConfig?: { userAgentAppId?: string } ignoreCache?: boolean profile?: string } @@ -211,7 +212,12 @@ export class AwsBedrockHandler implements ApiHandler { sessionToken?: string }> { // Configure provider options - const providerOptions: ProviderChainOptions = {} + const providerOptions: ProviderChainOptions = { + clientConfig: { + // set the inner sts client userAgentAppId + userAgentAppId: `cline#${ExtensionRegistryInfo.version}`, + }, + } const useProfile = (this.options.awsAuthentication === undefined && this.options.awsUseProfile) || this.options.awsAuthentication === "profile"