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
v2: no credential path for custom provider IDs breaks adding custom providers from GUI clients #51527
Custom providers seem to have no working credential path on the v2 integration API, which breaks adding them from GUI clients:
Integration.connection.key (packages/core/src/integration.ts) dies with Key method not found: <id> unless an integration with that exact ID is registered.
Key methods are only registered for providers present in the models.dev catalog (packages/core/src/plugin/models-dev.ts) plus plugin-defined ones — so a custom provider ID can never get a key through integration.connect.key.
Concretely: OpenChamber's custom-provider form routes the API key through this endpoint and always fails with "Integration not found: " for any custom ID (filed as openchamber/openchamber#4038). The official desktop dialog works around this by using the legacy auth.set (packages/opencode/src/server/routes/instance/httpapi/groups/control.ts) + config write instead.
Separately: a user on the stable OpenCode Desktop reports being unable to add custom providers/models from the UI — can you confirm which desktop release ships the custom-provider dialog (packages/app/src/components/dialog-custom-provider.tsx), and whether it is expected to work against the bundled server?
Question: is auth.set the intended long-term path for custom-provider credentials, or should integration.connect.key also accept arbitrary provider IDs? Right now any third-party GUI following the integration API cannot add custom providers.
OpenCode version
Source analysis of dev branch (2026-09-27); stable desktop 1.2.x
On v2 (dev), custom providers can already get credentials through the integration API, but only after the provider is in config:
packages/core/src/config/plugin/provider.ts registers a key method ("Manually enter API Key") for every provider under providers.<id>. It also adds an env method when env is set.
So the working order is: write the provider to config first, then, once the config has reloaded, call integration.connect.key with that ID.
Integration not found: <id> is what the server returns for an ID that isn't registered yet. That fits a client sending the key before the provider exists in config.
Your actual request is something different: let integration.connect.key accept any provider ID and store a credential before any config exists, or at least document the config-then-key order for third-party clients. I've recorded this as a feature request for maintainers to consider.
About the desktop part: the files you mention (packages/opencode/src/.../control.ts with auth.set, and packages/app/src/components/dialog-custom-provider.tsx) are v1 code, and stable desktop 1.2.x is v1. v1 only gets critical fixes. If adding custom providers fails on v2 even with the provider already in config, please reply with the version and the steps, and we'll look at it as a bug.
Activity
github-actions commentedon Sep 26, 2026
This issue might be a duplicate of existing issues. Please check:
/connectcannot find configured custom providers, preventing users from entering their API keys.keponk commentedon Oct 21, 2026
@chenyuhao0628 did you find a workaround? my custom provider works great on cli, but there's no way to access it via desktop. I keep getting:
chenyuhao0628 commentedon Oct 21, 2026
You could try having the AI directly help you modify the configuration sheet and just use another AI to do the configuration - that's one way
opencodejr commentedon Oct 28, 2026
Thanks for the detailed write-up, @chenyuhao0628.
On v2 (
dev), custom providers can already get credentials through the integration API, but only after the provider is in config:packages/core/src/config/plugin/provider.tsregisters akeymethod ("Manually enter API Key") for every provider underproviders.<id>. It also adds anenvmethod whenenvis set.integration.connect.keywith that ID.Integration not found: <id>is what the server returns for an ID that isn't registered yet. That fits a client sending the key before the provider exists in config.Your actual request is something different: let
integration.connect.keyaccept any provider ID and store a credential before any config exists, or at least document the config-then-key order for third-party clients. I've recorded this as a feature request for maintainers to consider.About the desktop part: the files you mention (
packages/opencode/src/.../control.tswithauth.set, andpackages/app/src/components/dialog-custom-provider.tsx) are v1 code, and stable desktop 1.2.x is v1. v1 only gets critical fixes. If adding custom providers fails on v2 even with the provider already in config, please reply with the version and the steps, and we'll look at it as a bug.