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

Closed
opened 2026-02-16 17:32:59 -05:00 by yindo · 5 comments
Owner

Originally created by @tomaszferens on GitHub (Sep 27, 2025).

Originally assigned to: @rekram1-node on GitHub.

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?

Originally created by @tomaszferens on GitHub (Sep 27, 2025). Originally assigned to: @rekram1-node on GitHub. 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`: ```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?
yindo closed this issue 2026-02-16 17:32:59 -05:00
Author
Owner

@rekram1-node commented on GitHub (Sep 27, 2025):

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

@rekram1-node commented on GitHub (Sep 27, 2025): 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
Author
Owner

@rekram1-node commented on GitHub (Sep 27, 2025):

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

will be in next release

@rekram1-node commented on GitHub (Sep 27, 2025): Just merged change so you could do that^^^ note the `"id"` field will be in next release
Author
Owner

@tomaszferens commented on GitHub (Jan 4, 2026):

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

@tomaszferens commented on GitHub (Jan 4, 2026): Is it now preferred to use it via "variants" feature?
Author
Owner

@rekram1-node commented on GitHub (Jan 4, 2026):

yes!

@rekram1-node commented on GitHub (Jan 4, 2026): yes!
Author
Owner

@moonray commented on GitHub (Jan 16, 2026):

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

@moonray commented on GitHub (Jan 16, 2026): 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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1863