fix(providers): bundled_profiles loads no plugin code in a safe worker

As list_providers(): a safe worker never executes provider plugins, so the
provider env catalog is empty there.
This commit is contained in:
Ben Barclay authored and Mark S. committed 2026-10-30 11:13:02 -04:00
1 parent e924f75176
commit 9d1cf25f00
1 file changed
+4
+4
View File
@@ -831,6 +831,10 @@ def bundled_profiles() -> list[ProviderProfile]:
order), WITHOUT config and without touching the registry: each bundled plugin is executed into
a private module whose registrations are collected. For descriptive catalogs, which must not
depend on config or on discovery having run."""
from agent.safe_worker_policy import safe_worker_enabled
if safe_worker_enabled(): # a safe worker loads no plugin code, bundled included (as list_providers)
return []
collected: list[ProviderProfile] = []
token = _COLLECT.set(collected)
try: