Skip to content

Title generation fails from unavailable gpt-5-nano fallback and possible variant leakage into OpenAI small_model #26181

Closed as not planned

Description

@speto

Summary

There appear to be two related title-generation problems in OpenCode:

  1. 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.

  2. 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" }

Activity

  1. github-actions commented on May 7, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Your issue combines both failure modes in a single report, which is useful context. It may still be worth keeping open if there are OpenAI/Codex-specific aspects not covered by those issues, but please review them to see if they already address your scenarios.

  2. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions