Skip to content

How to add new custom model variants with extended options? #2829

Closed

Description

@tomaszferens

How can I create a new custom model variant (e.g., gpt-5-high) that extends an existing model (gpt-5) with different options, without overwriting the original model configuration?

I want to have multiple configurations of the same base model with different options. For example:

  • gpt-5: Default configuration with medium reasoning effort
  • gpt-5-high: Same model but with reasoningEffort: "high"

Attempted to add a custom model in ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "opencode": {
      "models": {
        "gpt-5-high": {
          "options": {
            "reasoningEffort": "high",
            "textVerbosity": "low",
            "reasoningSummary": "auto"
          }
        }
      }
    }
  }
}

But I'm getting an error: AI_APICallError: Model gpt-5-high not supported

Is it possible to create custom model aliases/variants that extend existing models with different options?

Activity

  1. self-assigned this
    on Sep 27, 2025
  2. rekram1-node commented on Sep 27, 2025

    @rekram1-node
    Contributor

    hmm this isn't currently supported but this is a good idea, it would look more like this tho:

    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "opencode": {
          "models": {
            "gpt-5-high": {
              "id": "gpt-5",
              "options": {
                "reasoningEffort": "high",
                "textVerbosity": "low",
                "reasoningSummary": "auto"
              }
            },
            "gpt-5-low": {
              "id": "gpt-5",
              "options": {
                "reasoningEffort": "low",
                "textVerbosity": "low",
                "reasoningSummary": "auto"
              }
            }
          }
        }
      }
    }
    

    Support for thsi should be in next release

  3. rekram1-node commented on Sep 27, 2025

    @rekram1-node
    Contributor

    Just merged change so you could do that^^^ note the "id" field

    will be in next release

  4. tomaszferens commented on Jan 4, 2026

    @tomaszferens
    Author

    Is it now preferred to use it via "variants" feature?

  5. rekram1-node commented on Jan 4, 2026

    @rekram1-node
    Contributor

    yes!

  6. moonray commented on Jan 16, 2026

    @moonray

    There's very little docs on variants. Can it be used in an agent's frontmatter to always use that variant for an agent?

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