From c4a7108a7664a53f502f2dd493cef8216279e573 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 17:27:38 +0000 Subject: [PATCH] Address code review: add debug logging for unknown method resolution Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com> Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/bb80e772-3e03-420e-bb0e-76cfdde14a04 --- tradingagents/api_usage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tradingagents/api_usage.py b/tradingagents/api_usage.py index ea2e504b..61ef33fd 100644 --- a/tradingagents/api_usage.py +++ b/tradingagents/api_usage.py @@ -106,6 +106,12 @@ def _resolve_vendor(config: dict, method: str) -> str: try: category = get_category_for_method(method) except ValueError: + # Method not in any category — may be a new/unknown method. + # Return "unknown" so estimation can continue gracefully. + import logging + logging.getLogger(__name__).debug( + "Method %r not found in TOOLS_CATEGORIES — skipping vendor resolution", method + ) return "unknown" return config.get("data_vendors", {}).get(category, "yfinance")