@@ -20,7 +20,7 @@ import {
2020} from '../../index.js'
2121import { AgentPrinter } from '../printer.js'
2222import { BeforeInvocationEvent , BeforeToolsEvent } from '../../hooks/events.js'
23- import { BedrockConverseModel } from '../../models/bedrock.js'
23+ import { ConverseModel } from '../../models/bedrock.js'
2424import { StructuredOutputError } from '../../errors.js'
2525import { expectLoopMetrics } from '../../__fixtures__/metrics-helpers.js'
2626import { expectAgentResult } from '../../__fixtures__/agent-helpers.js'
@@ -797,11 +797,11 @@ describe('Agent', () => {
797797 expect ( agent . model ) . toBe ( model )
798798 } )
799799
800- it ( 'returns default BedrockConverseModel when no model provided' , ( ) => {
800+ it ( 'returns default ConverseModel when no model provided' , ( ) => {
801801 const agent = new Agent ( )
802802
803803 expect ( agent . model ) . toBeDefined ( )
804- expect ( agent . model . constructor . name ) . toBe ( 'BedrockConverseModel ' )
804+ expect ( agent . model . constructor . name ) . toBe ( 'ConverseModel ' )
805805 } )
806806 } )
807807
@@ -1097,25 +1097,25 @@ describe('Agent', () => {
10971097
10981098 describe ( 'model initialization' , ( ) => {
10991099 describe ( 'when model is a string' , ( ) => {
1100- it ( 'creates BedrockConverseModel with specified modelId' , ( ) => {
1100+ it ( 'creates ConverseModel with specified modelId' , ( ) => {
11011101 const agent = new Agent ( { model : 'anthropic.claude-3-5-sonnet-20240620-v1:0' } )
11021102
11031103 expect ( agent . model ) . toBeDefined ( )
1104- expect ( agent . model . constructor . name ) . toBe ( 'BedrockConverseModel ' )
1104+ expect ( agent . model . constructor . name ) . toBe ( 'ConverseModel ' )
11051105 expect ( agent . model . getConfig ( ) . modelId ) . toBe ( 'anthropic.claude-3-5-sonnet-20240620-v1:0' )
11061106 } )
11071107
1108- it ( 'creates BedrockConverseModel with custom model ID' , ( ) => {
1108+ it ( 'creates ConverseModel with custom model ID' , ( ) => {
11091109 const customModelId = 'custom.model.id'
11101110 const agent = new Agent ( { model : customModelId } )
11111111
11121112 expect ( agent . model . getConfig ( ) . modelId ) . toBe ( customModelId )
11131113 } )
11141114 } )
11151115
1116- describe ( 'when model is explicit BedrockConverseModel ' , ( ) => {
1117- it ( 'uses provided BedrockConverseModel instance' , ( ) => {
1118- const explicitModel = new BedrockConverseModel ( { modelId : 'explicit-model-id' } )
1116+ describe ( 'when model is explicit ConverseModel ' , ( ) => {
1117+ it ( 'uses provided ConverseModel instance' , ( ) => {
1118+ const explicitModel = new ConverseModel ( { modelId : 'explicit-model-id' } )
11191119 const agent = new Agent ( { model : explicitModel } )
11201120
11211121 expect ( agent . model ) . toBe ( explicitModel )
@@ -1124,23 +1124,23 @@ describe('Agent', () => {
11241124 } )
11251125
11261126 describe ( 'when no model is provided' , ( ) => {
1127- it ( 'creates default BedrockConverseModel ' , ( ) => {
1127+ it ( 'creates default ConverseModel ' , ( ) => {
11281128 const agent = new Agent ( )
11291129
11301130 expect ( agent . model ) . toBeDefined ( )
1131- expect ( agent . model . constructor . name ) . toBe ( 'BedrockConverseModel ' )
1131+ expect ( agent . model . constructor . name ) . toBe ( 'ConverseModel ' )
11321132 } )
11331133 } )
11341134
11351135 describe ( 'behavior parity' , ( ) => {
1136- it ( 'string model behaves identically to explicit BedrockConverseModel with same modelId' , ( ) => {
1136+ it ( 'string model behaves identically to explicit ConverseModel with same modelId' , ( ) => {
11371137 const modelId = 'anthropic.claude-3-5-sonnet-20240620-v1:0'
11381138
11391139 // Create agent with string model ID
11401140 const agentWithString = new Agent ( { model : modelId } )
11411141
1142- // Create agent with explicit BedrockConverseModel
1143- const explicitModel = new BedrockConverseModel ( { modelId } )
1142+ // Create agent with explicit ConverseModel
1143+ const explicitModel = new ConverseModel ( { modelId } )
11441144 const agentWithExplicit = new Agent ( { model : explicitModel } )
11451145
11461146 // Both should have same modelId
0 commit comments