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]: v2 plugin API: expose credential list/activate on ctx.integration #51410
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
v2 only. I'm writing a v2 plugin that falls back when a subscription is rate limited or out of quota. The retry hook plus ctx.session.switchModel already handles switching models.
The missing piece is rotating accounts of the same provider. v2 already stores many credentials per integration (every login adds one and activates it), but plugins can only read them, not switch between them:
there's no activate. It only exists on the HTTP client (client.credential.activate)
Proposed API
Core Credential.Service already implements this, so the change is only wiring in packages/plugin/src/promise/integration.ts + packages/core/src/plugin/host.ts:
I can list credential connections with (await ctx.integration.get({ integrationID })).data.connections.filter((connection) => connection.type === "credential"). The proposed list method is redundant. The only missing server-plugin API is activate(credentialID) so the retry hook can switch the active account before retrying. A TUI plugin can already call ctx.client.credential.activate, but the server-plugin context has no client.
Activity
github-actions commentedon Sep 25, 2026
This issue might be a duplicate of existing issues. Please check:
remorses commentedon Sep 29, 2026
I can list credential connections with
(await ctx.integration.get({ integrationID })).data.connections.filter((connection) => connection.type === "credential"). The proposedlistmethod is redundant. The only missing server-plugin API isactivate(credentialID)so the retry hook can switch the active account before retrying. A TUI plugin can already callctx.client.credential.activate, but the server-plugin context has no client.