Skip to content

fix: pass reasoning_effort directly to OpenAI API - #429

Merged
aksg87 merged 1 commit into
mainfrom
fix/openai-reasoning-effort
Apr 2, 2026
Merged

aksg87 merged 1 commit into
mainfrom
fix/openai-reasoning-effort

Conversation

@aksg87

@aksg87 aksg87 commented Apr 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix reasoning_effort being incorrectly nested into reasoning: {effort: ...} (Responses API shape) instead of passed as a top-level Chat Completions parameter.

  • Pass reasoning_effort directly to chat.completions.create()
  • Remove _normalize_reasoning_params() and reasoning dict passthrough
  • Update legacy kwargs tests to match new behavior

Test Plan

  • Unit test for direct passthrough
  • Live API test with o4-mini
  • Updated 4 legacy reasoning kwargs tests

Fixes #237

@github-actions github-actions Bot added the size/S Pull request with 50-150 lines changed label Apr 1, 2026
@aksg87
aksg87 merged commit 14a8f1d into main Apr 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Pull request with 50-150 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gpt5-mini fails when reasoning_effort is passed via provider_kwargs

1 participant