mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-08 22:21:23 +00:00
fix: add userAgentAppId to Bedrock embedder for code indexing (#10166)
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 Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
parent
45dbe4d028
commit
f899de1f53
1 changed files with 2 additions and 0 deletions
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue