Skip to content

fix: preserve configured reasoning effort in OpenAI OAuth requests - #58

Merged
rezaho merged 1 commit into
mainfrom
fix/oauth-reasoning-effort
Sep 9, 2026
Merged

fix: preserve configured reasoning effort in OpenAI OAuth requests#58
rezaho merged 1 commit into
mainfrom
fix/oauth-reasoning-effort

Conversation

@rezaho

@rezaho rezaho commented Sep 9, 2026

Copy link
Copy Markdown
Owner

An OpenAI OAuth model configured with reasoning_effort="low" reached the transport with only reasoning={"summary":"auto"}, so the requested depth was silently discarded on both sync and async calls. The OAuth payload builder now adds the configured effort alongside the existing summary. Explicit effort wins over the existing thinking-budget mapping; unset/nonpositive budgets omit effort, and Codex minimal requests use low, matching the API-key adapter's existing behavior.

The repair preserves caller cache keys and OAuth streaming, authentication, structured output and tool handling. Its effort vocabulary follows the existing four-value OpenAI mapping; this does not introduce model support or validation changes.

Validation: 138 targeted tests passed with four xdist workers, including 34 new regressions capturing the final transport payload through real BaseAPIModel sync/async forwarding. The new tests failed before the repair with 26 missing-effort failures and eight omission cases passing. Related cache-key, Azure effort, OAuth stream/token-refresh, schema and deferred-tool tests passed. Credentials and transport were replaced only at their external boundaries; no live model calls or credential reads.

@rezaho
rezaho merged commit e6f9e90 into main Sep 9, 2026
1 check passed
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.

1 participant