Skip to content

fix(opencode): expose max reasoning effort for GPT-5.6+ models#36136

Closed
javargasm wants to merge 1 commit into
anomalyco:devfrom
javargasm:gpt56-max-effort
Closed

fix(opencode): expose max reasoning effort for GPT-5.6+ models#36136
javargasm wants to merge 1 commit into
anomalyco:devfrom
javargasm:gpt56-max-effort

Conversation

@javargasm

@javargasm javargasm commented Jul 9, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #36141

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

OpenAI's reasoning_options for GPT-5.6 family models (gpt-5.6, gpt-5.6-terra, gpt-5.6-luna, gpt-5.6-sol) include max as a valid reasoning effort, but versionedGpt5ReasoningEfforts in transform.ts returns OPENAI_GPT5_2_PLUS_EFFORTS for all versions >= 2, which caps at xhigh.

The fix adds a dedicated OPENAI_GPT5_6_PLUS_EFFORTS constant that extends the 2+ set with max, and a version >= 6 check in versionedGpt5ReasoningEfforts to use it. Only GPT-5.6+ models are affected — earlier versions keep their existing effort sets unchanged.

How did you verify your code works?

  • Ran bun test test/provider/transform.test.ts — 295 tests pass (0 failures)
  • Added test cases for gpt-5.6 and gpt-5.6-terra that assert the full effort set ["none", "low", "medium", "high", "xhigh", "max"]

Screenshots / recordings

N/A — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

OpenAI reasoning_options for GPT-5.6 family models include "max" but
OpenCode was capping at "xhigh". Add a dedicated effort constant for
version >= 6 and update versionedGpt5ReasoningEfforts to use it.
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 9, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@javargasm

Copy link
Copy Markdown
Author

this is the correct fix:
35985

@javargasm javargasm closed this Jul 9, 2026
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.

GPT-5.6 models missing max reasoning effort variant

1 participant