O1's 'reasoning effort' parameter

In the live stream, it was mentioned there would be a parameter ‘reasoning effort’ user can set to adjust the inference time. But so far I have not seen it being mentioned anywhere in the docs, nor can it be found in the playground.

1 Like

Things are still rolling out, just give it some time

3 Likes

Hey!

You can find a little bit of info in the API reference:

reasoning_effort
o1 models only
Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.

Source: https://platform.openai.com/docs/api-reference/chat/create

6 Likes

i got the following error using the reasoning effort parameter: Error: Completions.create() got an unexpected keyword argument 'reasoning_effort'

This parameter was just added to the SDK days ago. As the OpenAI API library SDKs validate what they think are valid parameters, you’ll need to update the library.

Another alternative is to write your own, and send JSON body.

BTW, "Completions.create() implies using the wrong method from before version 1.0. OpenAI should fix that error output. That is what today’s code reports with parameter validation failure.


The new API reference documentation example implies that even existing models like gpt-4o would accept a role “developer”. This role is indeed now accepted on the API, likely translated to “system” for models. Evidence: Sending both roles together with contradictory AI identity, the first is more respected regardless of role, unless the first goes as far as “hate-filled AI” to be ignored.

Why did they waste the time of adding a new parameter if all models would only accept one prioritized field anyway? The playground is still sending “system” to gpt-4o. It has not been backported to the o1-mini model.

Perhaps a path forward of OpenAI reserving ultimate control for themselves.

from openai import OpenAI
client = OpenAI()

completion = client.chat.completions.create(
  model="gpt-4o",
  messages=[
    {"role": "developer", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ]
)

print(completion.choices[0].message)

1 Like

have you tried using the parameter with the updated openai library? didn’t work for me just yet.

The Python library code demonstrates its support, you can search this or beta.chat.completions for “reasoning”

Other SDKs are auto-built like Python, and should not be far behind.

I verify it is passed as a parameter. I receive the API’s denial of sending it to a model that everybody can access, instead of validation denial of the SDK.

1 Like

Yes. When I updated my openai python package it worked. I simply use the old system message for o1’s developer message.

How does your request look when using reasoning_effort?

Mine looks like this:

openai.chat.completions.create(
        model=model,
        messages=messages,
        reasoning_effort="high"
    )

…and returned this error message for o1-preview model:

OpenAI API: Error code: 400 - {‘error’: {‘message’: “Unknown parameter: ‘reasoning_effort’.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘reasoning_effort’, ‘code’: ‘unknown_parameter’}}

Hi and welcome to the community!
The parameter for reasoning effort is available only for use with the ‘full’ o1 model which is currently being rolled-out to Tier 5 users.
You may have to wait a bit longer before you can access it.
Hope this answers your question.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.