Repository navigation
fix(executor): normalize max effort for OpenAI-shape providers - #2916
diegosouzapw merged 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds normalization of reasoning_effort: "max" to "xhigh" for OpenAI-shape providers that support the xhigh tier but not the Claude-specific max tier, instead of unconditionally downgrading to high.
Changes:
- Introduce
shouldNormalizeMaxToXHighbranch insanitizeReasoningEffortForProviderto map max → xhigh when supported. - Restrict existing max → high downgrade to providers that also do not support xhigh.
- Add unit tests for both top-level and nested
reasoning.effortnormalization paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| open-sse/executors/base.ts | New normalization branch + doc comment update; minor formatting of effort allowlist condition. |
| tests/unit/base-executor-sanitize-effort.test.ts | Adds two tests covering top-level and nested max → xhigh normalization. |
There was a problem hiding this comment.
Code Review
This pull request introduces normalization logic for OpenAI-compatible providers, mapping the "max" reasoning effort to "xhigh" when that top tier is supported, and otherwise downgrading it to "high". It updates the sanitizeReasoningEffortForProvider function in open-sse/executors/base.ts to handle this normalization for both top-level and nested reasoning configurations, and adds corresponding unit tests in tests/unit/base-executor-sanitize-effort.test.ts. I have no feedback to provide as there are no review comments to address.
diegosouzapw
left a comment
There was a problem hiding this comment.
Approved after local verification, quality checks and merging into release/v3.8.7.
…ble-max-effort-xhigh fix(executor): normalize max effort for OpenAI-shape providers
Summary
reasoning_effort: "max"toxhighfor OpenAI-shape providers when the target supports the top effort tier.highfor providers/models that do not supportxhigh.reasoning_effortand nestedreasoning.effort.Tests
node --import tsx/esm --test tests/unit/base-executor-sanitize-effort.test.ts tests/unit/translator-claude-to-openai.test.ts tests/unit/translator-openai-responses-req.test.tsnpm run typecheck:corenpm run lint(passes with existing warnings)