TauricResearch/TradingAgents · error · ValueError
Method '{method}' not supported
Error message
Method '{method}' not supported What it means
Raised by route_to_vendor() in tradingagents/dataflows/interface.py when the method exists in TOOLS_CATEGORIES but has no entry in VENDOR_METHODS (the method->vendor implementation map). Practically a defensive dead-check for registry drift: a method categorized but with no vendor implementation registered.
Source
Thrown at tradingagents/dataflows/interface.py:175
config = get_config()
# Check tool-level configuration first (if method provided)
if method:
tool_vendors = config.get("tool_vendors", {})
if method in tool_vendors:
return tool_vendors[method]
# Fall back to category-level configuration
return config.get("data_vendors", {}).get(category, "default")
def route_to_vendor(method: str, *args, **kwargs):
"""Route method calls to appropriate vendor implementation with fallback support."""
category = get_category_for_method(method)
vendor_config = get_vendor(category, method)
primary_vendors = [v.strip() for v in vendor_config.split(',')]
if method not in VENDOR_METHODS:
raise ValueError(f"Method '{method}' not supported")
all_available_vendors = list(VENDOR_METHODS[method].keys())
# The configured vendor list IS the chain: we do NOT silently fall back to
# vendors the user did not choose (#988/#289) — that returned data from an
# unexpected source and caused cross-vendor inconsistencies. For multi-vendor
# fallback, list them in order, e.g. data_vendors="yfinance,alpha_vantage".
# The "default" sentinel (no explicit config) uses all available vendors.
explicit = [v for v in primary_vendors if v and v != "default"]
if explicit:
vendor_chain = [v for v in explicit if v in VENDOR_METHODS[method]]
if not vendor_chain:
raise ValueError(
f"Configured vendor(s) {explicit} not available for '{method}'. "
f"Available: {all_available_vendors}."
)
else:
vendor_chain = all_available_vendorsView on GitHub (pinned to a33fd4c0f1)
Solutions
- If you maintain a fork/added a tool: register the method in VENDOR_METHODS with at least one vendor implementation
- Reinstall/align the package so interface.py is a single consistent version: pip install --force-reinstall tradingagents
- Check for stray local edits: git status / git diff -- tradingagents/dataflows/interface.py
- As a caller, validate against VENDOR_METHODS (not just TOOLS_CATEGORIES) before dispatch
Example fix
# before
# (fork added "get_new_tool" to TOOLS_CATEGORIES but not VENDOR_METHODS)
route_to_vendor("get_new_tool", ...)
# -> ValueError: Method 'get_new_tool' not supported
# after
VENDOR_METHODS["get_new_tool"] = {"yfinance": my_new_tool_impl} # register the implementation Defensive patterns
Strategy: validation
Validate before calling
from tradingagents.dataflows.interface import VENDOR_METHODS
def routable(method: str) -> bool:
return bool(VENDOR_METHODS.get(method)) Try / catch
try:
route_to_vendor(method, *args)
except ValueError as e:
if "not supported" in str(e):
logger.error("Registry drift: %s categorized but has no vendors; reinstall consistent package", method)
raise Prevention
- When adding tools in a fork, register them in BOTH TOOLS_CATEGORIES and VENDOR_METHODS
- Reinstall a single consistent version instead of mixing files across releases
- Check git diff on interface.py when a fork starts failing here
When it happens
Trigger: A method name passes get_category_for_method() but was never added to VENDOR_METHODS — typically only after local modifications, forks that add a tool to one table but not the other, or version skew between files.
Common situations: Contributors adding a new tool to TOOLS_CATEGORIES without registering vendor implementations; vendored/partial upgrades where interface.py tables come from different versions; monkeypatching that replaces VENDOR_METHODS incompletely.
Related errors
- No available vendor for '{method}'
- Method '{method}' not found in any category
- Configured vendor(s) {explicit} not available for '{method}'
AI-assisted analysis of TauricResearch/TradingAgents@a33fd4c0f1 (2026-08-14).
Data as JSON: /api/errors/3c2fddc8635f8bbc.
Report an issue: GitHub.