Gpt-4o-search-preview invalid_request_error

{
  "error": {
    "message": "Model incompatible request arguments supplied: frequency_penalty, presence_penalty, temperature, top_p",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

encountered the same when calling with vercel AI SDK streamText() and there is no way to remove temperature, it defaults to 0 which then triggers OpenAI:

exception. requestBodyValues {
model: ‘gpt-4o-mini-search-preview’,
logit_bias: undefined,
logprobs: undefined,
top_logprobs: undefined,
user: undefined,
parallel_tool_calls: undefined,
max_tokens: undefined,
temperature: 0,

same here:
I tried to find any reference in the OpenAI API documentation about these parameters not being used, accepted, … with the new …-search models

But nothing documented, yet?!

can someone point us to an openAI doc or API reference page that explicitly hints which params are allowed in completions API for the new *-search models - and which not?

Thank you!

1 Like

Hi. You can view the availability of the parameters in the Playground.

Ran into the same issue with generateObject. I simply created a new method called generateObjectWithSearch calling OpenAI directly for now.