Skip to content

GitHub Copilot session auto-titling fails when enterprise policy disables gpt-5-mini #17531

Closed

Description

@johnnyhuy

Description

When using the GitHub Copilot provider in OpenCode, session auto-title generation can fail if the enterprise Copilot policy disables the small model that OpenCode selects for title generation.

In my case, github-copilot/gpt-5-mini was disabled in our enterprise Copilot settings. New sessions stayed on the default New session - ... title instead of getting an auto-generated conversation title after the first prompt.

From the current codepath, this seems consistent with title generation using Provider.getSmallModel(...) first, and GitHub Copilot prioritizing gpt-5-mini as a small model for title generation. If that model is unavailable due to enterprise policy, title generation appears to fail without a clear fallback or user-facing error.

It would be helpful if OpenCode either:

  • fell back to another available GitHub Copilot small model for title generation, or
  • surfaced a clear error explaining that the selected small model is disabled

Potentially related:

Plugins

None

OpenCode version

1.2.26

Steps to reproduce

Steps to reproduce

  1. Use OpenCode with the GitHub Copilot provider
  2. In enterprise GitHub Copilot settings, disable gpt-5-mini
  3. Start a new session
  4. Send the first real user prompt
  5. Observe that the session title stays as New session - ... instead of getting an auto-generated title

Screenshot and/or share link

Image

https://opncd.ai/share/QgiEXSlq

Operating System

macOS 15.3

Terminal

Terminal; Desktop

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 14, 2026
  2. github-actions commented on Mar 14, 2026

    @github-actions
    Contributor

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

    If your issue adds new context specific to the GitHub Copilot enterprise policy scenario, please clarify how it differs from those issues.

  3. johnnyhuy commented on Mar 14, 2026

    @johnnyhuy
    Author

    Happy to code commit something though there's a few considerations

    1. A warning message should suggest to configure small model(s) to fall back on
    2. If setting the global small model it sets it for all, which may inconsistently work based on provider availability
  4. StefanLobbenmeier commented on Mar 30, 2026

    @StefanLobbenmeier

    Our enterprise allows usage of 4.1 and 4o but not 5-mini (not sure if there is a reason or if models are only enabled after someone requests them)

    Since all three of them are free to use, maybe we can automatically fallback to the other 2 in case it fails? Although to be honest I would still prefer a warning, but the warning could suggest to try one of the three and link to the copilot models to show which models are cheap: https://docs.github.com/en/copilot/reference/ai-models/supported-models#model-multipliers

  5. t-monaghan commented on Mar 30, 2026

    @t-monaghan

    I've been having the same session title issues.
    Model provider - GitHub Copilot
    Small model - Haiku 4.5 (enabled)

    Interestingly 5-mini is enabled for my organisation, and after configuring the small model to 5-mini the issue has resolved.

  6. mrw commented on Apr 28, 2026

    @mrw

    I ran into the same issue and asked OpenCode to investigate:

    What's happening

    1. OpenCode auto-selects github-copilot/gpt-5-mini as your small_model (per the priority list in the binary).
    2. For title generation, OpenCode sends reasoning_effort: "minimal" (it wants the cheapest/fastest call).
    3. GitHub Copilot's gpt-5-mini endpoint rejects "minimal" — it only accepts low, medium, or high. The request 400s.
    4. The error is swallowed silently (no retry, no fallback), so the session keeps its placeholder title New session - .
      This is a Copilot-side API change — gpt-5-mini used to accept minimal. Your DB confirms it: every session through April 12 got a real title; everything April 15 and later is stuck as "New session - ...".

    Fix
    Pin small_model to one that doesn't get a reasoning_effort: "minimal" rejection. Add to ~/.config/opencode/opencode.json:
    "small_model": "github-copilot/claude-haiku-4.5"

    I added "small_model": "github-copilot/claude-haiku-4.5", to ~/.config/opencode/opencode.json and it fixed it.

  7. StefanLobbenmeier commented on Apr 29, 2026

    @StefanLobbenmeier

    Haiku has a multiplier of 0.33, I would recommend using one of the free models instead so you don’t burn your tokens on it:
    https://docs.github.com/en/copilot/reference/ai-models/supported-models#model-multipliers

    So GPT 4.1, 4o, 5 mini or Raptor mini

  8. mrw commented on Apr 29, 2026

    @mrw

    @StefanLobbenmeier I hear you on that, but the issue here is that we can't use gpt-5-mini because opencode hardcodes reasoning_effort: "minimal" AFAIK, and copilot doesn't support that on gpt-5-mini anymore. I'm not sure about the others.

  9. rekram1-node commented on Apr 29, 2026

    @rekram1-node
    Collaborator

    @mrw that is inaccurate, we dont hardcode that for copilot anymore

  10. rekram1-node commented on Apr 29, 2026

    @rekram1-node
    Collaborator

    If you are on a more recent opencode version I think this should be completely closed. We sync the models from ur account now so if it's disabled it should use other models

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

Metadata

Metadata

Assignees

Labels

acpbugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions