Browse Source

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

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
Longlone 3 months ago
parent
commit
3b72857124
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/opencode/src/session/prompt.ts

+ 5 - 1
packages/opencode/src/session/prompt.ts

@@ -1397,7 +1397,11 @@ export namespace SessionPrompt {
       ...small.info.options,
     }
     if (small.providerID === "openai" || small.modelID.includes("gpt-5")) {
-      options["reasoningEffort"] = "minimal"
+      if (small.modelID.includes("5.1")) {
+        options["reasoningEffort"] = "low"
+      } else {
+        options["reasoningEffort"] = "minimal"
+      }
     }
     if (small.providerID === "google") {
       options["thinkingConfig"] = {