Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

ExactDoug
Copy link

@ExactDoug ExactDoug commented Jun 25, 2025

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.
working_azureai_o3_model_config_1_of_2

working_azureai_o3_model_config_2_of_2


Important

Removes unsupported temperature parameter for Azure OpenAI o1, o3, and o4 models in openai.ts.

  • Behavior:
    • Removes temperature parameter for Azure OpenAI models in OpenAiHandler.
    • Specifically affects o1, o3, and o4 model families.
    • Sets temperature to undefined in createMessage() and handleO3FamilyMessage().
  • Logic:
    • Modifies condition in createMessage() to check for o1, o3, and o4 models.
    • Ensures temperature is excluded from API calls for these models.
  • Misc:

This description was created by Ellipsis for d5546e5. You can customize this summary. It will automatically update as commits are pushed.

@ExactDoug ExactDoug requested review from cte, jr and mrubens as code owners June 25, 2025 17:30
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 25, 2025
@daniel-lxs
Copy link
Collaborator

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!

@daniel-lxs daniel-lxs closed this Jun 25, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 25, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 25, 2025
@ExactDoug
Copy link
Author

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.

@ExactDoug
Copy link
Author

@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!

@daniel-lxs daniel-lxs reopened this Jun 25, 2025
@github-project-automation github-project-automation bot moved this from Done to New in Roo Code Roadmap Jun 25, 2025
@github-project-automation github-project-automation bot moved this from Done to Triage in Roo Code Roadmap Jun 25, 2025
@daniel-lxs
Copy link
Collaborator

Thank you @ExactDoug!

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 25, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 25, 2025
- 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
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 25, 2025
Copy link
Collaborator

@daniel-lxs daniel-lxs left a 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!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 25, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jun 25, 2025
@mrubens mrubens merged commit 889e925 into RooCodeInc:main Jun 26, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 26, 2025
Alorse pushed a commit to Alorse/Roo-Code that referenced this pull request Jun 27, 2025
…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>
hannesrudolph pushed a commit that referenced this pull request Jul 3, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Review size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Error with Azure OpenAI Reasoning Models

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.