Function: shutdownProviderManagers()
shutdownProviderManagers():
Promise<void>
Defined in: packages/agentos/src/api/model.ts:636
Shuts down every provider manager createProviderManager has cached
and empties the cache. Each provider's shutdown() closes its key pool,
which stops the pool's recheck timer and writes the keys' standing at once,
so a short-lived host (a CLI, a job) that calls this before it exits keeps
the last quarter second of key state its pools would otherwise lose to the
save debounce. A manager still initializing is awaited first; one whose
initialization failed is skipped. Calls after this one build new managers
as the first call did, and a manager built before it has finished waits
for it, so its pools start from what the old pools wrote.
Returns
Promise<void>