Skip to content

[FEATURE]: Add OPENCODE_ONLY_FREE_MODELS to hide paid hosted models #60383

Open

Description

@repparw

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

OpenCode supports OPENCODE_DISABLE_FREE_MODELS=1, but not its inverse. When connected to an OpenCode Console account without a paid or Go subscription, the model selector can still offer hosted paid models. Maintaining individual exclusions in a client like T3 Code is brittle as the catalog changes.

I'd like OPENCODE_ONLY_FREE_MODELS=1 (or true) to keep only free models on the opencode and opencode-go providers, leaving other providers unaffected. It could reuse the existing zero-input-price classification and filtering mechanism from #57478. Filtered models should disappear from defaults and fail explicit selection, as they do under the existing flag. It should work whether or not the user is signed in. If both flags are enabled, no hosted OpenCode models should remain available.

Activity

  1. opencodejr commented on Oct 29, 2026

    @opencodejr

    Thanks for the request! You're asking for an OPENCODE_ONLY_FREE_MODELS=1 (or true) flag, the reverse of OPENCODE_DISABLE_FREE_MODELS. It would keep only free models on the opencode and opencode-go providers and remove paid ones from defaults and explicit selection. Maintainers will consider it.

    Until then, you can get most of this with a small local server plugin. It uses the model-transform hook to remove every opencode / opencode-go model that has an input price, and leaves other providers alone:

    import { Plugin } from "@opencode/plugin"
    
    const HOSTED = new Set(["opencode", "opencode-go"])
    
    export default Plugin.define({
      id: "local.only-free-models",
      async setup(ctx) {
        await ctx.model.transform((editor) => {
          editor
            .list()
            .filter((model) => HOSTED.has(model.providerID))
            .filter((model) => model.cost.some((tier) => tier.input > 0))
            .forEach((model) => editor.remove(model.providerID, model.id))
        })
      },
    })

    To install it, save the file as .opencode/plugins/only-free-models/index.ts in your project, or as ~/.config/opencode/plugins/only-free-models/index.ts and add "./plugins/only-free-models" to plugins in your global opencode.json(c). Then run opencode service restart. I checked it against the plugin API types but couldn't run it here, so please let us know if it doesn't behave as expected. It always filters, so it has no environment toggle; you could add a process.env check at the top of setup if you want one.

    Related:

  2. mcoville commented on Nov 3, 2026

    @mcoville

    Wasn't if I needed to open a new request because my request is similar to this one, a selector for Opencode GO only models. I could not find a way on the Console /models to see a list of just the models included with my GO subscription.

    https://opencode.ai/console/go does show models and their monthly usage limits, but it doesn't show all the models nor what usage I have left for each model.

    I am new to GO, and really happy to have joined in, so if it is unnecessary to track individual model available usage limits , I apologise.

  3. mcoville commented on Nov 4, 2026

    @mcoville

    I swear I checked and the model list was not on the console yesterday. Today it is. Please tell me I'm not losing my mind.

    If you did just add it, thank you. That is very informative. If I understand the GO limits, is there a way to add a usage tracker to that list so I can tell if I am nearing the limit for a specific model?

    Keep up the great work.

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

Metadata

Metadata

Assignees

No one assigned

    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