ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Feature Request] support new SEARCH-capable OpenAI models gpt-4o-(mini-)search-preview

Open
#6,403 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
88.8k
Forks
59.1k
PR merge metrics
No merged PRs in 30d

Description

### 🥰 Feature Description

On Mar,11 2025, OpenAI introduced 2 new models that provide web search as part of chat completions API.

`Developers can now get fast, up-to-date answers with clear and relevant citations from the web. In the Responses API, web search is available as a tool when using gpt-4o and gpt-4o-mini, and can be paired with other tools or function calls.
`

We cannot simply add these models in NextChat with /app/constant.ts:
* because parameters `frequency_penalty` and `presence_penalty` are default parameters for OpenAI calls, but not supported yet for the below models.
* because interface RequestPayload has props beyond the common minimum of props across all OpenAI models
see /app/client/platforms/openai.ts

```javascript
const response = await openai.responses.create({
model: "gpt-4o",
tools: [ { type: "web_search_preview" } ],
input: "What was a positive news story that happened today?",
});

console.log(response.output_text);
```

https://platform.openai.com/docs/models/gpt-4o-mini-search-preview
GPT-4o mini Search Preview
Fast, affordable small model for web search

https://platform.openai.com/docs/models/gpt-4o-search-preview
GPT-4o Search Preview
GPT model for web search in Chat Completions

Response format
Temperature
1.00
Max tokens
2048
Stop sequences
Enter sequence and press Tab
0/4
Top P
1.00
Frequency penalty
0.00
Presence penalty
0.00

### 🧐 Proposed Solution

Can we please reduce the export interface RequestPayload to only cover the common minimum of props across all OpenAI models, but not more?
see /app/client/platforms/openai.ts

... and dynamically add props if needed for some models?

### 📝 Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.