I would like to do a request like

import OpenAI from "openai";
const client = new OpenAI();

const response = await client.responses.create({
    model: "gpt-4.1",
    tools: [ { type: "web_search_preview" } ],
    input: "What was a positive news story from today?",
});

console.log(response.output_text);

but was not able to configure tools: [ { type: "web_search_preview" } ]

Comment From: dev-jonghoonpark

The built-in tools seem to be available for use in the response API. related issue: https://github.com/spring-projects/spring-ai/issues/2962

Comment From: apappascs

I think this one is resolved by this pr https://github.com/spring-projects/spring-ai/pull/2460

Could you give it a try ?

Comment From: Akaiyo

@apappascs I don't think it is. #2460 adds support for those specific _SEARCH_PREVIEW models but does not add the ability to add the web_search_preview tool to other models. Mind you that this is a built in tool from OpenAI and not related to the tool calling of spring ai. As far as I am aware that is still not possible.

Furthermore, I can't even get the models introduced in #2460 to work anymore as I face the same problem as in issue #3253

Comment From: apappascs

@apappascs I don't think it is. #2460 adds support for those specific _SEARCH_PREVIEW models but does not add the ability to add the web_search_preview tool to other models. Mind you that this is a built in tool from OpenAI and not related to the tool calling of spring ai. As far as I am aware that is still not possible.

Furthermore, I can't even get the models introduced in #2460 to work anymore as I face the same problem as in issue #3253

Yes, you are right! After reviewing again, I see it's about the response api from Open Ai. I think the comment from Christian explains what the current status is https://github.com/spring-projects/spring-ai/issues/2962#issuecomment-2915850524