summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-09-06 22:50:16 -0500
committerGitHub <[email protected]>2025-09-06 22:50:16 -0500
commit93c2f5060e2391e9a579cc9e0d5065d205ca412a (patch)
treeb9615959b58a7f9070f336f4d027ac27a22c3e82
parent564143071eb7a1f7c204db8dda91492149a93604 (diff)
downloadopencode-93c2f5060e2391e9a579cc9e0d5065d205ca412a.tar.gz
opencode-93c2f5060e2391e9a579cc9e0d5065d205ca412a.zip
fix: title gen w/ gpt-5-nano (#2473)
-rw-r--r--packages/opencode/src/session/index.ts19
1 files changed, 14 insertions, 5 deletions
diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts
index 619aa86ec..8093f58a0 100644
--- a/packages/opencode/src/session/index.ts
+++ b/packages/opencode/src/session/index.ts
@@ -696,13 +696,22 @@ export namespace Session {
).length
if (numRealUserMsgs === 1 && !session.parentID && isDefaultTitle(session.title)) {
const small = (await Provider.getSmallModel(model.providerID)) ?? model
+ const options = {
+ ...ProviderTransform.options(small.providerID, small.modelID, input.sessionID),
+ ...small.info.options,
+ }
+ if (small.providerID === "openai") {
+ options["reasoningEffort"] = "minimal"
+ }
+ if (small.providerID === "google") {
+ options["thinkingConfig"] = {
+ thinkingBudget: 0,
+ }
+ }
generateText({
- maxOutputTokens: small.info.reasoning ? 1024 : 20,
+ maxOutputTokens: small.info.reasoning ? 1500 : 20,
providerOptions: {
- [model.providerID]: {
- ...small.info.options,
- ...ProviderTransform.options(small.providerID, small.modelID, input.sessionID),
- },
+ [model.providerID]: options,
},
messages: [
...SystemPrompt.title(model.providerID).map(