fix(managed-gateway): keep tool availability scans off the Nous token-refresh path

This commit is contained in:
Sylw3ster 2026-05-30 16:52:46 +03:00 committed by Teknium
parent 96643b4a52
commit 6a72af044c
7 changed files with 159 additions and 14 deletions

View file

@ -146,16 +146,16 @@ def _get_firecrawl_gateway_url() -> str:
def _is_tool_gateway_ready() -> bool:
"""Return True when gateway URL + Nous Subscriber token are available.
Reads ``read_nous_access_token`` and ``resolve_managed_tool_gateway``
Reads ``peek_nous_access_token`` and ``resolve_managed_tool_gateway``
via :mod:`tools.web_tools` rather than direct imports, so unit tests
that ``patch("tools.web_tools._read_nous_access_token", ...)`` see
that ``patch("tools.web_tools._peek_nous_access_token", ...)`` see
their patches honored. The names are re-exported on
:mod:`tools.web_tools` for exactly this reason.
"""
import tools.web_tools as _wt
return _wt.resolve_managed_tool_gateway(
"firecrawl", token_reader=_wt._read_nous_access_token
"firecrawl", token_reader=_wt._peek_nous_access_token
) is not None