Skip to content

Commit 3d427bb

Browse files
committed
Refactor AwsBedrockService to simplify model ID and inference profile ARN configuration
- Removed fallback values for model ID and inference profile ARN in backend/src/services/aws-bedrock.service.ts, ensuring that configuration values are directly retrieved from the config service. - Updated logging to reflect the current configuration state without hardcoded defaults.
1 parent 129a380 commit 3d427bb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

backend/src/services/aws-bedrock.service.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ export class AwsBedrockService {
8383
* Configure the model ID from configuration with fallback
8484
*/
8585
private configureModelId(): string {
86-
const modelId =
87-
this.configService.get<string>('aws.bedrock.model') ??
88-
'us.anthropic.claude-3-7-sonnet-20250219-v1:0';
86+
const modelId = this.configService.get<string>('aws.bedrock.model')!;
8987

9088
this.logger.log(
9189
`Using AWS Bedrock model: ${modelId}${this.inferenceProfileArn ? ' with inference profile' : ''}`,
@@ -98,9 +96,7 @@ export class AwsBedrockService {
9896
* Configure the inference profile ARN from configuration
9997
*/
10098
private configureInferenceProfileArn(): string | undefined {
101-
const inferenceProfileArn =
102-
this.configService.get<string>('aws.bedrock.inferenceProfileArn') ??
103-
'arn:aws:bedrock:us-east-1:841162674562:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0';
99+
const inferenceProfileArn = this.configService.get<string>('aws.bedrock.inferenceProfileArn');
104100

105101
this.logger.log(
106102
`Using AWS Bedrock model: ${this.modelId}${inferenceProfileArn ? ' with inference profile' : ''}`,

0 commit comments

Comments
 (0)