Summary
There appear to be two related title-generation problems in OpenCode:
-
Unavailable default/fallback small model: OpenCode can attempt to use gpt-5-nano for title/small-model work. For some Codex/OpenAI subscribers, gpt-5-nano is not available, so title generation fails unless the user configures another small_model.
-
Possible main-model variant leakage after configuring a replacement: After setting an explicit OpenAI small_model, for example:
"small_model": "openai/gpt-5.4-mini"
OpenCode correctly selects that model for title generation:
providerID=openai modelID=gpt-5.4-mini small=true agent=title
But title generation can still fail when the main/current agent model is also OpenAI GPT and uses high/xhigh/variant-style reasoning. The title remains New session - ....
The second issue looks like possible main-model variant/options leakage, or another OpenAI title-call isolation bug, rather than incorrect title model selection.
Environment
- OpenCode:
1.14.40
- Upgraded from:
1.14.31
- Provider: OpenAI/Codex subscription
gpt-5-nano: unavailable on this subscription
- Reproduced with external plugins disabled using
--pure
Config Used During Failure
{
"small_model": "openai/gpt-5.4-mini"
}
No agent.title.model override was set during the failing tests.
Actual Behavior
Case 1: Default/fallback gpt-5-nano
Without explicit small_model, OpenCode can try to use gpt-5-nano for title generation.
For Codex/OpenAI subscribers who do not have access to that model, title generation fails or errors.
Case 2: Explicit OpenAI small_model
After setting:
"small_model": "openai/gpt-5.4-mini"
OpenCode correctly selects that model for title generation:
providerID=openai modelID=gpt-5.4-mini small=true agent=title
However, when the main/current agent model is also OpenAI GPT and uses high/xhigh or variant-style reasoning, title generation can still fail and the session title remains default.
This reproduced in --pure mode, so it does not appear to be plugin-specific.
Control Tests
These controls worked:
-
Main OpenAI model + non-OpenAI title model:
{
"agent": {
"title": {
"model": "google/gemini-3-flash-preview"
}
}
}
Result: title generated successfully.
-
Main OpenAI model without high/xhigh variant + OpenAI title model:
Result: title generated successfully.
-
Non-OpenAI main model + OpenAI title model:
Result: title generated successfully.
A temporary chat.params diagnostic hook saw title options as:
{ "store": false, "reasoningEffort": "low" }
No visible leak of xhigh, provider-level medium, include, reasoningSummary, or textVerbosity was observed at that hook layer.
Expected Behavior
- OpenCode should not hardcode or blindly fall back to
gpt-5-nano when that model is unavailable for the active subscription/provider.
- If
small_model is explicitly configured, title generation should use it independently of the main model.
- Main model variants/options must not affect
small:true title-generation calls.
- If title generation fails, OpenCode should log or surface why instead of silently leaving
New session - ....
Related Issues / PRs
This looks related to the existing class of title/small-model isolation bugs:
This issue seems to combine two related failure modes: unavailable gpt-5-nano fallback for some Codex/OpenAI users, and possible main-model variant/options leakage or isolation failure after switching to an explicit OpenAI small_model.
Current Workaround
Use a non-OpenAI model specifically for the native title agent:
{
"agent": {
"title": {
"mode": "primary",
"model": "google/gemini-3-flash-preview"
}
}
}
This avoids the OpenAI title-generation path while keeping the main OpenAI model unchanged.
Suggested Fixes / Questions
-
Validate/default around gpt-5-nano availability before using it for title generation.
-
Provide a safer fallback chain for Codex/OpenAI subscribers where gpt-5-nano is unavailable.
-
Audit title generation for main-model variant/options leakage into small:true calls.
-
Add a regression test for: main OpenAI high/xhigh variant + explicit OpenAI small_model.
-
Add debug logging for title stream failure, empty output, or missing text-delta.
-
Confirm whether all final OpenAI title-call options are resolved after provider/model/agent/variant merging to safe values such as:
{ "store": false, "reasoningEffort": "low" }