Quellcode durchsuchen

Fix Bedrock user agent to report full SDK details (#9043)

AJ Juaire vor 1 Monat
Ursprung
Commit
c6a02bb8da
3 geänderte Dateien mit 479 neuen und 468 gelöschten Zeilen
  1. 476 465
      pnpm-lock.yaml
  2. 1 1
      src/api/providers/bedrock.ts
  3. 2 2
      src/package.json

Datei-Diff unterdrückt, da er zu groß ist
+ 476 - 465
pnpm-lock.yaml


+ 1 - 1
src/api/providers/bedrock.ts

@@ -219,7 +219,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
 		this.costModelConfig = this.getModel()
 		this.costModelConfig = this.getModel()
 
 
 		const clientConfig: BedrockRuntimeClientConfig = {
 		const clientConfig: BedrockRuntimeClientConfig = {
-			defaultUserAgentProvider: () => Promise.resolve([["RooCode", Package.version]]),
+			userAgentAppId: `RooCode#${Package.version}`,
 			region: this.options.awsRegion,
 			region: this.options.awsRegion,
 			// Add the endpoint configuration when specified and enabled
 			// Add the endpoint configuration when specified and enabled
 			...(this.options.awsBedrockEndpoint &&
 			...(this.options.awsBedrockEndpoint &&

+ 2 - 2
src/package.json

@@ -458,8 +458,8 @@
 		"@anthropic-ai/bedrock-sdk": "^0.10.2",
 		"@anthropic-ai/bedrock-sdk": "^0.10.2",
 		"@anthropic-ai/sdk": "^0.37.0",
 		"@anthropic-ai/sdk": "^0.37.0",
 		"@anthropic-ai/vertex-sdk": "^0.7.0",
 		"@anthropic-ai/vertex-sdk": "^0.7.0",
-		"@aws-sdk/client-bedrock-runtime": "^3.848.0",
-		"@aws-sdk/credential-providers": "^3.848.0",
+		"@aws-sdk/client-bedrock-runtime": "^3.922.0",
+		"@aws-sdk/credential-providers": "^3.922.0",
 		"@google/genai": "^1.0.0",
 		"@google/genai": "^1.0.0",
 		"@lmstudio/sdk": "^1.1.1",
 		"@lmstudio/sdk": "^1.1.1",
 		"@mistralai/mistralai": "^1.9.18",
 		"@mistralai/mistralai": "^1.9.18",

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.