-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix: Remove temperature parameter for Azure OpenAI reasoning models #5116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey @ExactDoug, thank you for your contribution! I'm having a bit of trouble understanding the goal of this PR. Could you clarify what problem it's trying to solve? We’ve recently moved to an issue-first workflow so we can better review PRs in context. If possible, please open a related issue describing the problem this PR addresses. That way, we can properly evaluate and test the proposed changes. I'll be closing this PR for now, but feel free to reopen it or submit a new one once there's an associated issue we can refer to. Thanks again! |
Hi @daniel-lxs, thanks for the feedback! I've updated the PR description to reference issue #1400 which describes the exact problem this PR addresses. |
@daniel-lxs Just to clarify - I've updated the PR description to properly link to issue #1400 using 'Fixes #1400'. However, as an external contributor, I don't have permissions to reopen the PR myself. Could you please click the 'Reopen pull request' button? The PR is ready for review with the proper issue link. Thanks! |
Thank you @ExactDoug! |
- Updated failing tests in openai.spec.ts to expect temperature: undefined for O3 models - This aligns with the PR changes that remove temperature parameter for Azure OpenAI o1, o3, and o4 models - All 4 previously failing tests now pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ExactDoug for your contribution!
I fixed the failing test, looks good to me!
…ooCodeInc#5116) * Fix temperature parameter error for Azure OpenAI reasoning models * Fix tests: Update O3 family model tests to expect temperature: undefined - Updated failing tests in openai.spec.ts to expect temperature: undefined for O3 models - This aligns with the PR changes that remove temperature parameter for Azure OpenAI o1, o3, and o4 models - All 4 previously failing tests now pass --------- Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
…5116) * Fix temperature parameter error for Azure OpenAI reasoning models * Fix tests: Update O3 family model tests to expect temperature: undefined - Updated failing tests in openai.spec.ts to expect temperature: undefined for O3 models - This aligns with the PR changes that remove temperature parameter for Azure OpenAI o1, o3, and o4 models - All 4 previously failing tests now pass --------- Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Fixes #1400
Modifies o3 family handler to add o1 and o4 families. All of these reasoning models in Azure AI OpenAI API service do not support the
temperature
parameter. Some of them reportedly have worked in some cases when setting the temperature to exactly 1.0. However Microsoft does not support them at all and they are not supposed to be included.In my case with using o3-mini the API requests were completely rejected with the response that temperature was an unsupported parameter.
This fix follows a similar model as Cline's fix for the same issue.
Setting temperature to null causes it to be completely excluded from the API call, which is exactly what Microsoft requires, and it works perfectly in my testing.
Screenshots showing working API provider configuration with this fix in place.

Important
Removes unsupported
temperature
parameter for Azure OpenAIo1
,o3
, ando4
models inopenai.ts
.temperature
parameter for Azure OpenAI models inOpenAiHandler
.o1
,o3
, ando4
model families.temperature
toundefined
increateMessage()
andhandleO3FamilyMessage()
.createMessage()
to check foro1
,o3
, ando4
models.temperature
is excluded from API calls for these models.This description was created by
for d5546e5. You can customize this summary. It will automatically update as commits are pushed.