@@ -230,7 +230,7 @@ describe('getOpenAIConfig', () => {
230230 const result = getOpenAIConfig ( mockApiKey , { modelOptions } ) ;
231231
232232 expect ( result . llmConfig . useResponsesApi ) . toBe ( true ) ;
233- expect ( result . tools ) . toEqual ( [ { type : 'web_search_preview ' } ] ) ;
233+ expect ( result . tools ) . toEqual ( [ { type : 'web_search ' } ] ) ;
234234 } ) ;
235235
236236 it ( 'should handle web_search from addParams overriding modelOptions' , ( ) => {
@@ -247,7 +247,7 @@ describe('getOpenAIConfig', () => {
247247 const result = getOpenAIConfig ( mockApiKey , { modelOptions, addParams } ) ;
248248
249249 expect ( result . llmConfig . useResponsesApi ) . toBe ( true ) ;
250- expect ( result . tools ) . toEqual ( [ { type : 'web_search_preview ' } ] ) ;
250+ expect ( result . tools ) . toEqual ( [ { type : 'web_search ' } ] ) ;
251251 // web_search should not be in modelKwargs or llmConfig
252252 expect ( ( result . llmConfig as Record < string , unknown > ) . web_search ) . toBeUndefined ( ) ;
253253 expect ( result . llmConfig . modelKwargs ) . toEqual ( { customParam : 'value' } ) ;
@@ -299,7 +299,7 @@ describe('getOpenAIConfig', () => {
299299
300300 // Should keep the original web_search from modelOptions since addParams value is not boolean
301301 expect ( result . llmConfig . useResponsesApi ) . toBe ( true ) ;
302- expect ( result . tools ) . toEqual ( [ { type : 'web_search_preview ' } ] ) ;
302+ expect ( result . tools ) . toEqual ( [ { type : 'web_search ' } ] ) ;
303303 expect ( result . llmConfig . temperature ) . toBe ( 0.7 ) ;
304304 // web_search should not be added to modelKwargs
305305 expect ( result . llmConfig . modelKwargs ) . toBeUndefined ( ) ;
@@ -335,7 +335,7 @@ describe('getOpenAIConfig', () => {
335335
336336 // web_search should trigger the tool but not appear in config
337337 expect ( result . llmConfig . useResponsesApi ) . toBe ( true ) ;
338- expect ( result . tools ) . toEqual ( [ { type : 'web_search_preview ' } ] ) ;
338+ expect ( result . tools ) . toEqual ( [ { type : 'web_search ' } ] ) ;
339339 expect ( ( result . llmConfig as Record < string , unknown > ) . web_search ) . toBeUndefined ( ) ;
340340 expect ( result . llmConfig . temperature ) . toBe ( 0.5 ) ;
341341 expect ( result . llmConfig . modelKwargs ) . toEqual ( { customParam1 : 'value1' } ) ;
@@ -1164,7 +1164,7 @@ describe('getOpenAIConfig', () => {
11641164 text : { verbosity : Verbosity . medium } ,
11651165 customParam : 'custom-value' ,
11661166 } ) ;
1167- expect ( result . tools ) . toEqual ( [ { type : 'web_search_preview ' } ] ) ;
1167+ expect ( result . tools ) . toEqual ( [ { type : 'web_search ' } ] ) ;
11681168 expect ( result . configOptions ) . toMatchObject ( {
11691169 baseURL : 'https://api.custom.com' ,
11701170 defaultHeaders : { 'X-Custom' : 'value' } ,
0 commit comments