From e972d326e40bc1811fa16c501fc74d3590b807d3 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Wed, 17 Dec 2025 23:15:14 +0000 Subject: [PATCH] fix: add userAgentAppId to Bedrock embedder for code indexing Adds userAgentAppId configuration to the BedrockRuntimeClient in the code indexing embedder, matching the implementation pattern already used in the main Bedrock API provider. This enables proper user agent identification in CloudTrail AWS requests when using Bedrock for code indexing embeddings. Fixes #10165 --- src/services/code-index/embedders/bedrock.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/code-index/embedders/bedrock.ts b/src/services/code-index/embedders/bedrock.ts index 2430b465dc8..e99d6ee25ec 100644 --- a/src/services/code-index/embedders/bedrock.ts +++ b/src/services/code-index/embedders/bedrock.ts @@ -8,6 +8,7 @@ import { INITIAL_RETRY_DELAY_MS as INITIAL_DELAY_MS, } from "../constants" import { getDefaultModelId } from "../../../shared/embeddingModels" +import { Package } from "../../../shared/package" import { t } from "../../../i18n" import { withValidationErrorHandling, formatEmbeddingError, HttpError } from "../shared/validation-helpers" import { TelemetryEventName } from "@roo-code/types" @@ -40,6 +41,7 @@ export class BedrockEmbedder implements IEmbedder { const credentials = this.profile ? fromIni({ profile: this.profile }) : fromEnv() this.bedrockClient = new BedrockRuntimeClient({ + userAgentAppId: `RooCode#${Package.version}`, region: this.region, credentials, })