Skip to content

fix(openai_models): Use correct options for o3 and o3-mini models#1370

Open
BillionClaw wants to merge 1 commit intosimonw:mainfrom
BillionClaw:clawoss/fix-o3-model-options
Open

fix(openai_models): Use correct options for o3 and o3-mini models#1370
BillionClaw wants to merge 1 commit intosimonw:mainfrom
BillionClaw:clawoss/fix-o3-model-options

Conversation

@BillionClaw
Copy link

Summary

Fixes #731

The o3 and o3-mini models don't support temperature, max_tokens, top_p, frequency_penalty, and presence_penalty parameters. When these parameters are passed to the OpenAI API, it returns an error like:

Unsupported parameter: 'temperature' is not supported with this model.

This PR creates a new OptionsForO3 class that only includes the supported parameters:

  • max_completion_tokens - Maximum number of tokens to generate (including reasoning tokens)
  • reasoning_effort - Constraints effort on reasoning (low, medium, high)

Changes

  • Added OptionsForO3 class with only max_completion_tokens and reasoning_effort options
  • Added is_o3 parameter to _Shared class to distinguish o3 models from other reasoning models
  • Updated o3 and o3-mini model registrations to use is_o3=True instead of reasoning=True

Testing

  • Verified that o3 and o3-mini models now only expose max_completion_tokens and reasoning_effort options
  • Verified that other reasoning models (like o1) still use OptionsForReasoning with all standard options
  • Ran existing tests to ensure no regressions

The o3 and o3-mini models don't support temperature, max_tokens, top_p,
frequency_penalty, and presence_penalty parameters. They only support
max_completion_tokens and reasoning_effort.

Fixes simonw#731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

o3-mini: unsupported parameters listed in docs/usage.md

1 participant