diff --git a/agent/error_classifier.py b/agent/error_classifier.py index 30a2ad491..158105030 100644 --- a/agent/error_classifier.py +++ b/agent/error_classifier.py @@ -734,6 +734,7 @@ def _classify_by_message( FailoverReason.auth, retryable=False, should_rotate_credential=True, + should_fallback=True, ) # Model not found patterns diff --git a/tools/web_tools.py b/tools/web_tools.py index f743c4272..21a6c8a86 100644 --- a/tools/web_tools.py +++ b/tools/web_tools.py @@ -1190,10 +1190,12 @@ async def web_extract_tool( Raises: Exception: If extraction fails or API key is not set """ - # Block URLs containing embedded secrets (exfiltration prevention) + # Block URLs containing embedded secrets (exfiltration prevention). + # URL-decode first so percent-encoded secrets (%73k- = sk-) are caught. from agent.redact import _PREFIX_RE + from urllib.parse import unquote for _url in urls: - if _PREFIX_RE.search(_url): + if _PREFIX_RE.search(_url) or _PREFIX_RE.search(unquote(_url)): return json.dumps({ "success": False, "error": "Blocked: URL contains what appears to be an API key or token. "