Skip to content

title agent use not allowed param reasoning_effort: minimal #22796

Closed

Description

@SsparKluo

Description

When using github-copilot/gpt-5-mini as small_model, the title agent will fail because it only support [low, medium, high] for reasoning_effort, but got minimal

"responseBody":"{"error":{"message":"reasoning_effort \"minimal\" is not supported by model gpt-5-mini; supported values: [low medium high]","code":"invalid_reasoning_effort"}}\n","isRetryable":false,"data":{"error":{"message":"reasoning_effort "minimal" is not supported by model gpt-5-mini; supported values: [low medium high]","code":"invalid_reasoning_effort"}}}} stream error

Plugins

No response

OpenCode version

1.4.6

Steps to reproduce

  1. use github-copilot/gpt-5-mini
  2. create a new session
  3. the new session will not be renamed.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

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

    @github-actions
    Contributor

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

  3. changed the title [-]title agent use not allowed param `reasoning_effort: low`[/-] [+]title agent use not allowed param `reasoning_effort: minimal`[/+] on Apr 16, 2026
  4. tiger0425 commented on Apr 16, 2026

    @tiger0425

    I think this should be fixed in the reasoning-effort normalization layer rather than only in the title agent.

    From the error here and the older duplicate-like report in #4451, the broader problem seems to be:

    • OpenCode can send reasoning_effort: minimal
    • but some OpenAI-compatible / GitHub Copilot models (like github-copilot/gpt-5-mini) only accept [low, medium, high]
    • so the title generation request fails and session rename breaks

    Suggested fix:

    1. Normalize reasoning_effort against the target model's supported values before building the request
    2. If minimal is requested but the model only supports [low, medium, high], coerce minimal -> low
    3. If the model exposes no compatible value at all, omit reasoning_effort instead of hard-failing a non-critical path like title generation

    Why this seems better than a title-agent-only patch:

    Practical fallback policy could be something like:

    • support contains minimal -> send minimal
    • support contains low but not minimal -> send low
    • otherwise -> omit the field

    At minimum, applying that fallback for the title agent / small_model path would unblock gpt-5-mini users immediately.

  5. rekram1-node commented on Apr 28, 2026

    @rekram1-node
    Collaborator
      if (model.api.id.includes("5.") || model.api.id.includes("5-mini")) {
        return { store: false, reasoningEffort: "low" }
      }
    

    It will set it to low

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

Metadata

Metadata

Assignees

Labels

bugSomething 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