Skip to content

Missleading documentation or incorrect behaviour about small_model #8609

Closed as not planned

Description

@podliy16

Description

Looking at the documentation for OpenCode at https://opencode.ai/docs/config/:

The small_model option configures a separate model for lightweight tasks like title generation. By default, OpenCode tries to use a cheaper model if one is available from your provider, otherwise it falls back to your main model.

However

export async function getSmallModel(providerID: string) {

The code shows that OpenCode first attempts to use its own opencode provider for the small model. Only if the opencode provider is unavailable does it fall back to the user's main configured model.

This discrepancy can lead to unexpected behavior. For example, when using deepseek-reasoner via the DeepSeek provider as a main model, OpenCode silently used opencode nano-5-gpt as the small model. This means session data was sent to OpenCode's servers without explicit notice, raising potential privacy concerns.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jan 15, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if your specific case differs from these existing reports.

  2. Nindaleth commented on Jan 15, 2026

    @Nindaleth
    Contributor

    This means session data was sent to OpenCode's servers without explicit notice, raising potential privacy concerns.

    If you don't want opencode provider to be active, you can disable it in your config:

    {
      "$schema": "https://opencode.ai/config.json",
      "disabled_providers": ["opencode"]
    }
    

    Or it's also possible to configure a whitelist-only using enabled_providers.

    What I agree is done incorrectly in the linked functions is this:

        if (providerID.startsWith("github-copilot")) {
            // prioritize free models for github copilot
            priority = ["gpt-5-mini", "claude-haiku-4.5", ...priority]
        }
    

    claude-haiku-4.5 has a cost of 0.33 premium requests per request, it's absolutely not free; if more models are needed than just gpt-5-mini, then gpt-4.1 is another candidate

  3. podliy16 commented on Jan 15, 2026

    @podliy16
    Author

    Yes, my point is not about how to configure it, but that the stated default behavior in the documentation contradicts the actual code.

    More importantly, the actual default behavior—silently sending data to a third-party service (opencode) when the user has configured a different primary provider—constitutes a privacy issue and should be clearly communicated.

  4. Nindaleth commented on Jan 15, 2026

    @Nindaleth
    Contributor

    I don't see any silent sending of data to 3rd-party services. I only see that if you already use opencode provider, you get the most appropriate small model for it. If I use github-copilot, I'll get the most appropriate model for github-copilot, the check for opencode is just earlier but not relevant (EDIT: nor applied) to my use in that case.

  5. podliy16 commented on Jan 15, 2026

    @podliy16
    Author

    I don't see any silent sending of data to 3rd-party services.

    I launched opencode CLI, chose DeepSeek as the provider, and started using it without any additional configuration. I expected that my session and my data would be sent only to DeepSeek. However, for some reason, my session data is being sent to opencode as well.

    That's what I mean by "silent sending data to 3rd-party services"

  6. added a commit that references this issue on Jan 15, 2026
    6844738
  7. davedean commented on Jan 20, 2026

    @davedean

    This opencode behaviour is a problem for me too, and I found this bug while looking for how the session titles were constructed.

    I want to use opencode in two modes:

    • vibe coding things which are 99% public anyway
    • editing my personal notes which I want to stay private

    In order to do this I have:

    • coding models (using various providers, including opencode)
    • local models (using locally hosted models, various servers)

    When editing my notes I'm expecting slower responses, and this is a tradeoff I've made for privacy.

    How the session titles were generating so fast was suspicious.

    It seems that at the moment, if I have "other providers" than my local models, some parts of the sessions with the local models may leak to those providers.

    Is there a way for me to configure opencode that I can meet both my use cases, or do I need to maintain multiple config files?

  8. tlvince commented on Jan 27, 2026

    @tlvince

    This behaviour is documented, albeit under the self-hosted GitLab provider:

    :::note[compliance note]
    OpenCode uses a small model for some AI tasks like generating the session title.
    It is configured to use gpt-5-nano by default, hosted by Zen. To lock OpenCode
    to only use your own GitLab-hosted instance, add the following to your
    `opencode.json` file. It is also recommended to disable session sharing.
    ```json
    {
    "$schema": "https://opencode.ai/config.json",
    "small_model": "gitlab/duo-chat-haiku-4-5",
    "share": "disabled"
    }
    ```
    :::

    The small_model config docs should probably be updated with something along the same lines.

  9. ghost91- commented on Mar 11, 2026

    @ghost91-
    Contributor

    It seems like the fallback to gpt-5-nano from the opencode provider has recently been removed, see 7d7837e. With that change, the small model should always be selected from the current provider. So this issue can be closed, I guess?

  10. removed
    bugSomething isn't working
    on May 3, 2026
  11. b-m-tr commented on May 6, 2026

    @b-m-tr

    Woe. that is indeed conceraning. Furthermore it is sent to OpenAI wgich stores data for 30 days according to domcumetation of OpenCode service. And code isn't actually searching for smaller model present, it search against predefined list.

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