Skip to content

fix: update reasoningEffort logic for gpt-5.1 models in SessionPrompt-ensureTitle#4456

Merged
rekram1-node merged 2 commits intoanomalyco:devfrom
WAY29:dev
Nov 18, 2025
Merged

fix: update reasoningEffort logic for gpt-5.1 models in SessionPrompt-ensureTitle#4456
rekram1-node merged 2 commits intoanomalyco:devfrom
WAY29:dev

Conversation

@WAY29
Copy link
Copy Markdown
Contributor

@WAY29 WAY29 commented Nov 18, 2025

No description provided.

@WAY29
Copy link
Copy Markdown
Contributor Author

WAY29 commented Nov 18, 2025

Ref: #4451

@rekram1-node
Copy link
Copy Markdown
Collaborator

@WAY29 do we need that fallback to none? I think just the gpt-5.1 case should do it right

@rekram1-node
Copy link
Copy Markdown
Collaborator

Im just gonna use the immediate fix im not sure that default would work across the board? So ill just do this for now

@rekram1-node
Copy link
Copy Markdown
Collaborator

/oc read the changes made in this pr, make this override existing change:

 if (small.providerID === "openai" || small.modelID.includes("gpt-5")) {
      if (small.modelID.includes("5.1")) {
        options["reasoningEffort"] = "low"
      } else {
        options["reasoningEffort"] = "minimal"
      }
    }

@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Nov 18, 2025

The override has been implemented. The new logic now:

  1. Checks if the provider is OpenAI or the model includes "gpt-5"
  2. If the model includes "5.1", sets reasoningEffort to "low"
  3. Otherwise, sets reasoningEffort to "minimal"

This simplifies the logic by removing the fallback to "none" and the specific "-5-" pattern matching, as requested.

New%20session%20-%202025-11-18T20%3A17%3A35.246Z
opencode session  |  github run

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
@rekram1-node rekram1-node merged commit 3b72857 into anomalyco:dev Nov 18, 2025
2 of 3 checks passed
@WAY29
Copy link
Copy Markdown
Contributor Author

WAY29 commented Nov 19, 2025

Im just gonna use the immediate fix im not sure that default would work across the board? So ill just do this for now

OK, fallback to None was a design choice I made with compatibility in mind for the future gpt model; this solution is also applicable now.

xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
…-ensureTitle (anomalyco#4456)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
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.

2 participants