@@ -182,6 +182,7 @@ import {
182182 sanitizeResponseHeadersForLog ,
183183} from "./lib/runtime/metrics.js" ;
184184import { runOAuthBrowserFlow } from "./lib/runtime/oauth-browser-flow.js" ;
185+ import { applyRuntimePreemptiveQuotaSettings } from "./lib/runtime/preemptive-quota.js" ;
185186import { ensureRuntimeRefreshGuardian } from "./lib/runtime/refresh-guardian.js" ;
186187import { ensureRuntimeSessionAffinity } from "./lib/runtime/session-affinity.js" ;
187188import { showRuntimeToast } from "./lib/runtime/toast.js" ;
@@ -521,13 +522,12 @@ export const OpenAIOAuthPlugin: Plugin = async ({ client }: PluginInput) => {
521522 const applyPreemptiveQuotaSettings = (
522523 pluginConfig : ReturnType < typeof loadPluginConfig > ,
523524 ) : void => {
524- preemptiveQuotaScheduler . configure ( {
525- enabled : getPreemptiveQuotaEnabled ( pluginConfig ) ,
526- remainingPercentThresholdPrimary :
527- getPreemptiveQuotaRemainingPercent5h ( pluginConfig ) ,
528- remainingPercentThresholdSecondary :
529- getPreemptiveQuotaRemainingPercent7d ( pluginConfig ) ,
530- maxDeferralMs : getPreemptiveQuotaMaxDeferralMs ( pluginConfig ) ,
525+ applyRuntimePreemptiveQuotaSettings ( pluginConfig , {
526+ configure : ( options ) => preemptiveQuotaScheduler . configure ( options ) ,
527+ getPreemptiveQuotaEnabled,
528+ getPreemptiveQuotaRemainingPercent5h,
529+ getPreemptiveQuotaRemainingPercent7d,
530+ getPreemptiveQuotaMaxDeferralMs,
531531 } ) ;
532532 } ;
533533
0 commit comments