fix: recognize structured oauth accounts in routing (#369)

* fix: recognize structured oauth accounts in routing

* fix: use structured oauth accounts in account list
This commit is contained in:
Cita
2026-04-01 17:15:22 +08:00
committed by GitHub
parent e2d9481b95
commit 21d92e1887
8 changed files with 209 additions and 30 deletions
@@ -136,13 +136,13 @@ export function bindSurfaceStickyChannel(input: {
stickySessionKey?: string | null;
selected: {
channel: { id: number };
account?: { extraConfig?: string | null } | null;
account?: { extraConfig?: string | null; oauthProvider?: string | null } | null;
};
}): void {
proxyChannelCoordinator.bindStickyChannel(
input.stickySessionKey,
input.selected.channel.id,
input.selected.account?.extraConfig,
input.selected.account || undefined,
);
}
@@ -162,7 +162,7 @@ export async function acquireSurfaceChannelLease(input: {
stickySessionKey?: string | null;
selected: {
channel: { id: number };
account?: { extraConfig?: string | null } | null;
account?: { extraConfig?: string | null; oauthProvider?: string | null } | null;
};
}) {
return await proxyChannelCoordinator.acquireChannelLease({
@@ -171,6 +171,7 @@ export async function acquireSurfaceChannelLease(input: {
// the pre-sticky-session parallel behavior instead of contending globally.
channelId: input.stickySessionKey ? input.selected.channel.id : 0,
accountExtraConfig: input.selected.account?.extraConfig,
accountOauthProvider: input.selected.account?.oauthProvider,
});
}