You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Expose configured model eligibility to model transforms #54480
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
A plugin can register a ctx.model.transform that creates a model alias: a new catalog entry with a different id but the same underlying modelID (the execution target). For example, a transform could select the newest match for openai/gpt-*-sol and materialize it as openai/gpt-sol.
Observed in OpenCode v2.0.26 on macOS: after setting providers.openai.models.gpt-6.1-sol.disabled to true and reloading the config, openai/gpt-6.1-sol disappears from the catalog, but openai/gpt-sol remains and its metadata matches the hidden model rather than the next candidate, openai/gpt-6-sol.
Could the plugin API expose configured model eligibility to transforms before they materialize aliases, or otherwise provide a supported way to check whether an alias's execution target is disabled, while preserving config precedence?
To restate the request: a plugin that creates model aliases with ctx.model.transform needs a supported way to tell whether a target model has been disabled in config, so that an alias like openai/gpt-sol can skip a disabled openai/gpt-6.1-sol and use the next candidate. Config precedence should still hold.
I checked the current code and it matches what you found. The built-in config transform is registered after external model transforms on purpose, so that config wins. That same step is where disabled becomes enabled = false, so external transforms never see it. This is a gap in the plugin API, not a bug in your plugin. A few ways it could be closed:
a read-only view of configured overrides or eligibility on the model editor during transforms
a later transform or validation phase that runs after config overrides are applied
a built-in alias concept that picks its target only after eligibility is applied
Activity
opencode-agent commentedon Oct 11, 2026
Thanks for the detailed write-up, @vmvarela!
To restate the request: a plugin that creates model aliases with
ctx.model.transformneeds a supported way to tell whether a target model has been disabled in config, so that an alias likeopenai/gpt-solcan skip a disabledopenai/gpt-6.1-soland use the next candidate. Config precedence should still hold.I checked the current code and it matches what you found. The built-in config transform is registered after external model transforms on purpose, so that config wins. That same step is where
disabledbecomesenabled = false, so external transforms never see it. This is a gap in the plugin API, not a bug in your plugin. A few ways it could be closed:Maintainers will consider this. Related issues:
opencode-model-aliases