Skip to content

Commit e972d32

Browse files
committed
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
1 parent 45dbe4d commit e972d32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/services/code-index/embedders/bedrock.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
INITIAL_RETRY_DELAY_MS as INITIAL_DELAY_MS,
99
} from "../constants"
1010
import { getDefaultModelId } from "../../../shared/embeddingModels"
11+
import { Package } from "../../../shared/package"
1112
import { t } from "../../../i18n"
1213
import { withValidationErrorHandling, formatEmbeddingError, HttpError } from "../shared/validation-helpers"
1314
import { TelemetryEventName } from "@roo-code/types"
@@ -40,6 +41,7 @@ export class BedrockEmbedder implements IEmbedder {
4041
const credentials = this.profile ? fromIni({ profile: this.profile }) : fromEnv()
4142

4243
this.bedrockClient = new BedrockRuntimeClient({
44+
userAgentAppId: `RooCode#${Package.version}`,
4345
region: this.region,
4446
credentials,
4547
})

0 commit comments

Comments
 (0)