You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto session title generation fails for opencode provider models (smallOptions missing provider config) #30662
When using an opencode provider model (e.g., big-pickle), the auto session title generation silently fails — the title stays as the default "New session - ...". With other providers like minimax, the title is auto-generated correctly.
Root Cause
The title agent calls llm.stream() with small: true (src/session/prompt.ts:277), which triggers smallOptions() in src/provider/transform.ts:1149. The smallOptions() function has no special handling for the opencode provider — it only handles openai, openrouter/llmgateway, and venice. For opencode models, it returns an empty {}.
Meanwhile, the normal options() function (line 1126-1130) does set opencode-specific parameters:
Without these, the API request likely fails or returns unexpected output. The error is silently swallowed by Effect.ignore at line 1300 in prompt.ts.
Expected Behavior
smallOptions() should include the same promptCacheKey, include, and reasoningSummary for opencode provider models that options() provides, so the title agent works correctly with opencode provider models.
Affected Code
src/provider/transform.ts — smallOptions() function (line 1149), missing opencode provider case
These all share the core symptom (title stays as "New session - ...") but with different root causes. If the fix in #30662 is distinct (adding opencode provider config to smallOptions()), it may still be worth tracking separately. Please review and confirm whether this overlaps with any of the above.
This issue (#30662) is specifically about smallOptions() in transform.ts lacking opencode provider handling. The options() function sets promptCacheKey, include (INCLUDE_ENCRYPTED_REASONING), and reasoningSummary for opencode models, but smallOptions() returns an empty {}. This is a separate, concrete code gap that affects all opencode provider models regardless of variants or model resolution.
All four are valid bugs that compound — fixing all four would give robust title generation.
I'd like to work on this. The root cause analysis in the description is clear — smallOptions() needs the same opencode provider handling that options() already has. I'll add the missing provider config and submit a PR.
Hey @itallovidal! Thanks for the nudge. I haven't gotten to the PR yet — will work on it soon. The fix should be straightforward (adding provider config to smallOptions()).
PR #31092 (fix(provider): respect configured small_model and add opencode handling to smallOptions) will also fix this issue once merged. It addresses the same root cause - smallOptions() missing opencode provider handling.
Still failing on opencode Zen API routing — still facing this issue on v1.17.13 with the opencode provider (big-pickle). smallOptions() in src/provider/transform.ts still lacks the opencode case. @itallovidal can i work on this fix ?
Hey @Jackdrakes — heads up, there's already an open PR for this: #31092 (by @beenotung) which adds the opencode case to smallOptions(). It just hasn't been merged yet. You might want to check if that PR is still active before starting fresh work, or coordinate with the author. 👍
Thanks for the heads-up! I hadn't noticed the existing PR. I'll keep an eye on #31092 and won't duplicate the work while it's under review. If it ends up going stale or needs additional help, I'd be happy to contribute then. Thanks!
Result: title generation starts but produces no response or logged error; the session remains New session - <timestamp>
The configured model works for regular requests. The failure appears specific to the title-agent small-model request path. Errors are not visible because the title-generation failure is swallowed by Effect.ignore.
Confirmed still reproducible on v1.18.19 (current release), but I found a working local workaround — no code change needed.
Workaround (tested working)
Pin small_model to a model that works. This is my config — I tested it in a fresh session and the title agent auto-generates titles correctly.
Add small_model to your global opencode config at ~/.config/opencode/opencode.json (i.e. the opencode.json under the .config/opencode/ folder in your home directory):
Provider.getSmallModel checks cfg.small_model first (provider.ts:1917) and returns that model regardless of the session's provider, so even with the opencode provider (e.g. big-pickle, which otherwise resolves to gpt-5.4-nano and fails) the title agent now works.
Note: after editing, open a new session to test — existing sessions keep their already-failed New session - <timestamp> title.
For others who don't use ollama-cloud
If you don't use ollama-cloud, opencode/big-pickle is a free model on the opencode provider you can use instead:
"small_model": "opencode/big-pickle"
Caveat: big-pickle sits on the same opencode provider that smallOptions() in src/provider/transform.ts still lacks a case for, so it may not be bulletproof for everyone. If you hit the free-tier quota or it still fails, just point small_model at any other model/provider you prefer.
Alternative: a local lm-studio model
If you run lm-studio locally, you can point small_model at a small local model (e.g. lm-studio/nvidia-nemotron-3-nano-4b). It's free, private, and not subject to cloud quotas:
A small/fast local model is ideal for title generation, which only needs a short summary of the first message. Just make sure the local model is loaded in lm-studio when you start an opencode session.
Status of the actual fix
Still not fixed in source — smallOptions() has no opencode branch (only openai, openrouter/llmgateway, venice), while the normal options() does set promptCacheKey/include/reasoningSummary for providerID.startsWith("opencode"). Both prior fix PRs (#31760, #31092) closed without merging. Would be great to re-land one of them.
Thanks @beenotung for the detailed writeup and for keeping at this — I took this on back in June and never landed it, so appreciate you driving #31092. Sorry to see both fix PRs (#31092, #31760) closed without merging; the smallOptions() gap is clearly still real on v1.18.19.
If you re-land the fix, I'm happy to test the opencode provider path and confirm the title agent works. The small_model pin is a solid stopgap in the meantime — thanks for documenting it with exact config.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Jun 4, 2026
This issue might be a duplicate of existing issues. Please check:
Effect.ignore)smallOptionsnot stripping unsupported params)These all share the core symptom (title stays as "New session - ...") but with different root causes. If the fix in #30662 is distinct (adding opencode provider config to
smallOptions()), it may still be worth tracking separately. Please review and confirm whether this overlaps with any of the above.beenotung commentedon Jun 4, 2026
This is distinct from the three issues mentioned:
effort/variant parameters leaking into the small model call (affects Anthropic/etc.); root cause is in howuser.variantis passed through, not insmallOptionsgetSmallModelfailing due to Effect-TS??not handlingOption.None/failed effects; root cause is in model resolution logic, not insmallOptionsThis issue (#30662) is specifically about
smallOptions()intransform.tslacking opencode provider handling. Theoptions()function setspromptCacheKey,include(INCLUDE_ENCRYPTED_REASONING), andreasoningSummaryfor opencode models, butsmallOptions()returns an empty{}. This is a separate, concrete code gap that affects all opencode provider models regardless of variants or model resolution.All four are valid bugs that compound — fixing all four would give robust title generation.
kagura-chen commentedon Jun 4, 2026
I'd like to work on this. The root cause analysis in the description is clear —
smallOptions()needs the same opencode provider handling thatoptions()already has. I'll add the missing provider config and submit a PR.itallovidal commentedon Jun 10, 2026
yes! im having this issue right now
itallovidal commentedon Jun 10, 2026
any updates @kagura-agent ?
kagura-chen commentedon Jun 10, 2026
Hey @itallovidal! Thanks for the nudge. I haven't gotten to the PR yet — will work on it soon. The fix should be straightforward (adding provider config to
smallOptions()).kagura-chen commentedon Jun 10, 2026
Hi @itallovidal — sorry for the delay! I haven't submitted a PR yet. I'll get to it and update here once the PR is up. Thanks for the nudge.
beenotung commentedon Jun 11, 2026
PR #31092 (fix(provider): respect configured small_model and add opencode handling to smallOptions) will also fix this issue once merged. It addresses the same root cause - smallOptions() missing opencode provider handling.
kagura-chen commentedon Jun 11, 2026
Thanks @beenotung! Glad to see PR #31092 covering this. I was too slow getting to it — appreciate you stepping in. 🙏
Jackdrakes commentedon Jul 5, 2026
Still failing on opencode Zen API routing — still facing this issue on v1.17.13 with the opencode provider (big-pickle). smallOptions() in src/provider/transform.ts still lacks the opencode case. @itallovidal can i work on this fix ?
kagura-chen commentedon Jul 5, 2026
Hey @Jackdrakes — heads up, there's already an open PR for this: #31092 (by @beenotung) which adds the opencode case to
smallOptions(). It just hasn't been merged yet. You might want to check if that PR is still active before starting fresh work, or coordinate with the author. 👍Jackdrakes commentedon Jul 5, 2026
Thanks for the heads-up! I hadn't noticed the existing PR. I'll keep an eye on #31092 and won't duplicate the work while it's under review. If it ends up going stale or needs additional help, I'd be happy to contribute then. Thanks!
joaomj commentedon Jul 14, 2026
Additional reproduction metadata:
ses_09fa61b72ffezk4fTmfhQkRqAwses_09fa380d2ffeeSQlMzKoext2pI1.17.18and1.17.20opencode/deepseek-v4-flash-freetitleproviderID=opencode modelID=deepseek-v4-flash-free small=true agent=titleNew session - <timestamp>The configured model works for regular requests. The failure appears specific to the title-agent small-model request path. Errors are not visible because the title-generation failure is swallowed by
Effect.ignore.beenotung commentedon Aug 22, 2026
Confirmed still reproducible on v1.18.19 (current release), but I found a working local workaround — no code change needed.
Workaround (tested working)
Pin
small_modelto a model that works. This is my config — I tested it in a fresh session and the title agent auto-generates titles correctly.Add
small_modelto your global opencode config at~/.config/opencode/opencode.json(i.e. theopencode.jsonunder the.config/opencode/folder in your home directory):Provider.getSmallModelcheckscfg.small_modelfirst (provider.ts:1917) and returns that model regardless of the session's provider, so even with theopencodeprovider (e.g.big-pickle, which otherwise resolves togpt-5.4-nanoand fails) the title agent now works.For others who don't use ollama-cloud
If you don't use ollama-cloud,
opencode/big-pickleis a free model on theopencodeprovider you can use instead:Alternative: a local lm-studio model
If you run lm-studio locally, you can point
small_modelat a small local model (e.g.lm-studio/nvidia-nemotron-3-nano-4b). It's free, private, and not subject to cloud quotas:A small/fast local model is ideal for title generation, which only needs a short summary of the first message. Just make sure the local model is loaded in lm-studio when you start an opencode session.
Status of the actual fix
Still not fixed in source —
smallOptions()has noopencodebranch (onlyopenai,openrouter/llmgateway,venice), while the normaloptions()does setpromptCacheKey/include/reasoningSummaryforproviderID.startsWith("opencode"). Both prior fix PRs (#31760, #31092) closed without merging. Would be great to re-land one of them.kagura-chen commentedon Aug 23, 2026
Thanks @beenotung for the detailed writeup and for keeping at this — I took this on back in June and never landed it, so appreciate you driving #31092. Sorry to see both fix PRs (#31092, #31760) closed without merging; the
smallOptions()gap is clearly still real on v1.18.19.If you re-land the fix, I'm happy to test the opencode provider path and confirm the title agent works. The
small_modelpin is a solid stopgap in the meantime — thanks for documenting it with exact config.thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊