Repository navigation
session-titles-bundle: maxOutputTokens 64 is fully consumed by thinking tokens, so automatic title generation fails silently #9661
Replies: 2 comments
|
This happens because How to Fix / Workaround
If this helps explain/resolve the issue, please click Mark as answer! |
|
Confirmed on The bundle's
Worth noting what the fix commit already said, because it is the identical diagnosis as this report:
So the problem was understood and fixed for Measured on 117 real local sessions (e2e bursts excluded)
Split by provider era, the bundle era shows failures that are not all the token cap:
Only 3 of those bundle-era failures are |
Uh oh!
There was an error while loading. Please reload this page.
Summary
With
@deepseek-ai/dsh-experimental-session-titles-bundle(0.2.1-alpha.2) enabled on a reasoning route, most automatic title generations never produce a title. The session keeps its deterministic fallback title (the first prompt truncated tofallbackMaxBytes), so the sidebar and tab title look frozen. The failure is silent: it only callsctx.logger.warn, and the host has no logger exporter that persists runtime warnings — the only exporter feeds the startup-failure log (~/.dsh/logs/startup-*.log), so nothing appears in any file or UI.Root cause
The bundle's
cordis.patch.ymlconfigures the all-prompts title provider withmaxOutputTokens: 64:The provider selects the route's lowest reasoning effort
(
selectReasoningEffort = (model) => model.reasoning?.efforts[0]?.id,packages/experimental/session-title-all-prompts-llm/src/index.ts). For a route whosecompat.thinkingFormatisdeepseek(e.g.opencode-go/deepseek-v4.1-flash),@earendil-works/pi-aithen sendsthinking: { type: "enabled" }and reasoning tokens count againstmax_tokens. The 64-token budget is consumed by reasoning, the response terminates withfinish_reason: "length"and empty content, andtitleFromResponse()throwssession-title-llm: title output reached maxOutputTokens. The service keeps the previous title by design ("automatic failures emit a warning and keep the latest title").The bundled first-message provider uses
maxOutputTokens: 4096. The comment on that value indsh-base/cordis.patch.ymlsays the ceiling is "a ceiling against runaway output, not a length target: the prompt keeps titles short, while reasoning a model cannot switch off also counts as output". A cap of 64 contradicts that constraint for any reasoning route.Reproduction
Same route, same system prompt as the provider, one message,
thinking: { type: "enabled" }, varying onlymax_tokens:Observed impact
Across local session logs, 40
session/title-llm-requestevents withtitleProvider: session-title-all-prompts-llmproduced only 9 acceptedsession/titleevents (source.kind === "provider") — roughly 22%. The remaining sessions keep the truncated first-prompt fallback indefinitely, which reads as "the plugin does nothing".Suggested fix
Raise the cap for the auxiliary title call (4096, matching
dsh-base) or stop enabling thinking for title calls. 64 tokens is below what a reasoning route needs for even a trivial title, so the call has no reliable path to a usable answer.Environment
0.2.1-alpha.2installed from npm, macOS,webprofileopencode-go/deepseek-v4.1-flash(pi-ai catalog entry:reasoning: true,compat.thinkingFormat: "deepseek",compat.maxTokensField: "max_tokens")optional-session-title-all-promptsin the profile patch layer (~/.dsh/profiles/web/cordis.patch.yml) raisingmaxOutputTokensto 4096; the override is shallow-replaced, so all five fields are restatedAll reactions