type ProviderRuntimeModule = typeof import("./provider-runtime.js"); type AugmentModelCatalogWithProviderPlugins = ProviderRuntimeModule["augmentModelCatalogWithProviderPlugins"]; type BuildProviderAuthDoctorHintWithPlugin = ProviderRuntimeModule["buildProviderAuthDoctorHintWithPlugin"]; type BuildProviderMissingAuthMessageWithPlugin = ProviderRuntimeModule["buildProviderMissingAuthMessageWithPlugin"]; type FormatProviderAuthProfileApiKeyWithPlugin = ProviderRuntimeModule["formatProviderAuthProfileApiKeyWithPlugin"]; type PrepareProviderRuntimeAuth = ProviderRuntimeModule["prepareProviderRuntimeAuth"]; type RefreshProviderOAuthCredentialWithPlugin = ProviderRuntimeModule["refreshProviderOAuthCredentialWithPlugin"]; let providerRuntimePromise: Promise | undefined; async function loadProviderRuntime(): Promise { // Keep the heavy provider runtime behind an actual async boundary so callers // can import this wrapper eagerly without collapsing the lazy chunk. providerRuntimePromise ??= import("./provider-runtime.js"); return providerRuntimePromise; } export async function augmentModelCatalogWithProviderPlugins( ...args: Parameters ): Promise>> { const runtime = await loadProviderRuntime(); return runtime.augmentModelCatalogWithProviderPlugins(...args); } export async function buildProviderAuthDoctorHintWithPlugin( ...args: Parameters ): Promise>> { const runtime = await loadProviderRuntime(); return runtime.buildProviderAuthDoctorHintWithPlugin(...args); } export async function buildProviderMissingAuthMessageWithPlugin( ...args: Parameters ): Promise>> { const runtime = await loadProviderRuntime(); return runtime.buildProviderMissingAuthMessageWithPlugin(...args); } export async function formatProviderAuthProfileApiKeyWithPlugin( ...args: Parameters ): Promise>> { const runtime = await loadProviderRuntime(); return runtime.formatProviderAuthProfileApiKeyWithPlugin(...args); } export async function prepareProviderRuntimeAuth( ...args: Parameters ): Promise>> { const runtime = await loadProviderRuntime(); return runtime.prepareProviderRuntimeAuth(...args); } export async function refreshProviderOAuthCredentialWithPlugin( ...args: Parameters ): Promise>> { const runtime = await loadProviderRuntime(); return runtime.refreshProviderOAuthCredentialWithPlugin(...args); }