pi-mono/packages/agent/docs
Mario Zechner 6e98573f24 feat(ai): sync model reads, explicit async refresh
Provider.getModels() is sync-only (last-known list; must not throw) with
an optional refreshModels() where dynamic providers fetch. The
sync-or-async union invited latent sync assumptions that would detonate
on the first dynamic provider; async-only reads would force sync
consumer surfaces (extension find/getAll) through Promises. Sync reads
plus an explicit refresh verb keeps the contract single and the
staleness visible.

Models.getModels()/getModel() are sync best-effort reads;
Models.refresh(provider?) rejects with ModelsError(model_source) for a
single provider and is concurrent best-effort across all providers.
createProvider() takes a models array plus an optional refreshModels
fetcher (stored on success, in-flight calls deduped, list unchanged on
rejection). forceRefresh options are gone.

Also finishes the in-progress AuthStorage fallbackResolver removal
(drops the now-unused includeFallback option from getApiKey).
2026-06-10 23:30:04 +02:00
..
agent-harness.md Finish harness tool registry semantics 2026-05-28 12:34:02 +02:00
durable-harness.md Finish harness tool registry semantics 2026-05-28 12:34:02 +02:00
hooks.md docs(agent): organize harness design todos 2026-05-16 22:07:20 +02:00
models.md feat(ai): sync model reads, explicit async refresh 2026-06-10 23:30:04 +02:00
observability.md docs(agent): organize harness design todos 2026-05-16 22:07:20 +02:00