fix(tools): stop check_fns swallowing resolver crashes into "returned False"

check_vision_requirements (and five siblings: browser_vision, image/video
generation, x_search, browser_vault) wrapped their whole probe in
`except Exception: return False`. The registry then logged "returned False",
indistinguishable from an unconfigured backend, and the only diagnostic for a
crashed resolver was gone (#87950: named custom provider lookup failing in a
long-lived multi-profile process, reported as vision tools silently vanishing).

The registry owns the verdict: _run_check_fn_uncached and _check_fn_cached both
catch, log with traceback, and return False. Let the exception reach them.
Behaviour for the model is unchanged (tool hidden either way); agent.log now
says why.
This commit is contained in:
teknium1
2026-09-13 12:20:17 -07:00
committed by Teknium
parent aa7980d777
commit 643b3f450d
7 changed files with 30 additions and 34 deletions
+2 -5
View File
@@ -104,11 +104,8 @@ def _discovered_registry():
def check_video_generation_requirements() -> bool:
"""True when at least one registered provider reports available."""
try:
registry_mod, _ = _discovered_registry()
return any(_provider_call(p, "is_available", False) for p in registry_mod.list_providers())
except Exception:
return False
registry_mod, _ = _discovered_registry()
return any(_provider_call(p, "is_available", False) for p in registry_mod.list_providers())
def _resolve_active_provider():