From 93c2f5060e2391e9a579cc9e0d5065d205ca412a Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sat, 6 Sep 2025 22:50:16 -0500 Subject: [PATCH] fix: title gen w/ gpt-5-nano (#2473) --- packages/opencode/src/session/index.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts index 619aa86e..8093f58a 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(