@@ -211,6 +211,7 @@ import { applyAccountStorageScopeEntry } from "./lib/runtime/account-storage-sco
211211import { runBrowserOAuthFlow } from "./lib/runtime/browser-oauth-flow.js" ;
212212import { handleRuntimeEvent } from "./lib/runtime/event-handler.js" ;
213213import { ensureLiveAccountSyncEntry } from "./lib/runtime/live-sync-entry.js" ;
214+ import { applyLoaderRuntimeSetup } from "./lib/runtime/loader-setup.js" ;
214215import { buildManualOAuthFlow } from "./lib/runtime/manual-oauth-flow.js" ;
215216import {
216217 applyPreemptiveQuotaSettingsFromConfig ,
@@ -691,11 +692,15 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
691692 async loader ( getAuth : ( ) => Promise < Auth > , provider : unknown ) {
692693 const auth = await getAuth ( ) ;
693694 const pluginConfig = loadPluginConfig ( ) ;
694- applyUiRuntimeFromConfig ( pluginConfig , setUiRuntimeOptions ) ;
695- applyAccountStorageScope ( pluginConfig ) ;
696- ensureSessionAffinity ( pluginConfig ) ;
697- ensureRefreshGuardian ( pluginConfig ) ;
698- applyPreemptiveQuotaSettings ( pluginConfig ) ;
695+ applyLoaderRuntimeSetup ( {
696+ pluginConfig,
697+ applyUiRuntimeFromConfig : ( config ) =>
698+ applyUiRuntimeFromConfig ( config , setUiRuntimeOptions ) ,
699+ applyAccountStorageScope,
700+ ensureSessionAffinity,
701+ ensureRefreshGuardian,
702+ applyPreemptiveQuotaSettings,
703+ } ) ;
699704
700705 // Only handle OAuth auth type, skip API key auth
701706 if ( auth . type !== "oauth" ) {
0 commit comments