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
Our use case involves a custom provider, and we'd like to lock down the TUI to just this provider.
Currently, since the provider config is a blocklist, we need to update the config every time the provider list changes. Instead, it would be nice to have an enabled_providers config array, which only enables the providers that are supplied.
In the case of a conflict between enabled and disabled, the disabled option would take priority, to support backwards compatibility.
If this is a desired feature, and not already on the backlog, I'd be happy to have a stab at contributing this.
@tsdevshop only 1 provider ships by default so if you disable opencode provider and only auth for your custom one(s) it would essentially be what you are asking for, right? (opencode should only be showing providers you are logged into aside from actual opencode provider). You can run opencode auth list to see all the providers you are logged into.
I suppose, but there is nothing to stop consumers authing other providers, and these will then show up in the TUI as available. I'd like to prevent that scenario, if possible.
A little background - we want all model interactions to go through our internal proxy, rather than directly accessing endpoints. Right now, we support this with a custom provider, and so we'd like to restrict the TUI to this provider only.
Activity
[-]provider allowlist[/-][+]config: support a provider allowlist[/+]rekram1-node commentedon Sep 29, 2025
@tsdevshop only 1 provider ships by default so if you disable opencode provider and only auth for your custom one(s) it would essentially be what you are asking for, right? (opencode should only be showing providers you are logged into aside from actual opencode provider). You can run
opencode auth listto see all the providers you are logged into.ex:
tsdevshop commentedon Sep 30, 2025
I suppose, but there is nothing to stop consumers authing other providers, and these will then show up in the TUI as available. I'd like to prevent that scenario, if possible.
A little background - we want all model interactions to go through our internal proxy, rather than directly accessing endpoints. Right now, we support this with a custom provider, and so we'd like to restrict the TUI to this provider only.
rekram1-node commentedon Sep 30, 2025
got it
bogorad commentedon Oct 24, 2025
possibly related: #3417
benceferdinandy-signifyd commentedon Nov 11, 2025
We have similar concerns and blacklisting is an uphill battle.
rekram1-node commentedon Nov 21, 2025
added in next release fffe20c
jayteaftw commentedon Dec 15, 2025
@rekram1-node Thank you for adding this! However this was hard to come by as I do not think it was ever added to the docs. Maybe it should be added after https://opencode.ai/docs/config/#disabled-providers?
rekram1-node commentedon Dec 15, 2025
/oc use the docs agent to add section under the disabled-providers in config.mdx about allow list for providers
opencode-agent commentedon Dec 15, 2025
Created PR #5586
opencode session | github run
rekram1-node commentedon Dec 15, 2025
added @jayteaftw
jayteaftw commentedon Dec 15, 2025
@rekram1-node that was cool! 😀