{"record":{"id":"542cbf824ab85a48","repo":"TauricResearch/TradingAgents","slug":"configured-vendor-s-explicit-not-available-for","errorCode":null,"errorMessage":"Configured vendor(s) {explicit} not available for '{method}'. Available: {all_available_vendors}.","messagePattern":"Configured vendor\\(s\\) (.+?) not available for '(.+?)'\\. Available: (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tradingagents/dataflows/interface.py","lineNumber":188,"sourceCode":"    category = get_category_for_method(method)\n    vendor_config = get_vendor(category, method)\n    primary_vendors = [v.strip() for v in vendor_config.split(',')]\n\n    if method not in VENDOR_METHODS:\n        raise ValueError(f\"Method '{method}' not supported\")\n\n    all_available_vendors = list(VENDOR_METHODS[method].keys())\n\n    # The configured vendor list IS the chain: we do NOT silently fall back to\n    # vendors the user did not choose (#988/#289) — that returned data from an\n    # unexpected source and caused cross-vendor inconsistencies. For multi-vendor\n    # fallback, list them in order, e.g. data_vendors=\"yfinance,alpha_vantage\".\n    # The \"default\" sentinel (no explicit config) uses all available vendors.\n    explicit = [v for v in primary_vendors if v and v != \"default\"]\n    if explicit:\n        vendor_chain = [v for v in explicit if v in VENDOR_METHODS[method]]\n        if not vendor_chain:\n            raise ValueError(\n                f\"Configured vendor(s) {explicit} not available for '{method}'. \"\n                f\"Available: {all_available_vendors}.\"\n            )\n    else:\n        vendor_chain = all_available_vendors\n\n    last_no_data: NoMarketDataError | None = None\n    first_error: Exception | None = None\n    for vendor in vendor_chain:\n        vendor_impl = VENDOR_METHODS[method][vendor]\n        impl_func = vendor_impl[0] if isinstance(vendor_impl, list) else vendor_impl\n\n        try:\n            return impl_func(*args, **kwargs)\n        except VendorRateLimitError:\n            logger.warning(\"Vendor %r rate-limited for %s; trying next vendor.\", vendor, method)\n            continue\n        except VendorNotConfiguredError as e:","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/TauricResearch/TradingAgents/blob/a33fd4c0f134485a43553a2c23a63cb14adbd88f/tradingagents/dataflows/interface.py#L170-L206","documentation":"Raised by route_to_vendor() in tradingagents/dataflows/interface.py when the user explicitly configured vendors (data_vendors or tool_vendors) for a method's category, but none of the explicitly named vendors exist in VENDOR_METHODS[method]. Since the configured list IS the chain with no silent fallback (#988/#289), a fully unrecognized list aborts immediately with the available options listed.","triggerScenarios":"Setting data_vendors={\"stock_data\": \"finnhub\"} when only ['yfinance','alpha_vantage',...] are implemented for those tools; misspelling a vendor ('alphavantage' without the underscore); configuring a vendor valid for one category on a category it does not serve; stale names after a vendor was removed in an upgrade.","commonSituations":"Copy-pasted config from older/newer docs; typos; assuming one vendor setting applies to every category; config files surviving an upgrade that renamed vendors.","solutions":["Read the message — it lists the valid vendors; correct data_vendors/tool_vendors to use one of them exactly (e.g. 'alpha_vantage', underscore included)","Scope vendor choices per category/tool via tool_vendors when a vendor only serves some methods","Leave the value as 'default' (or omit it) to use all available vendors in order","For ordered fallback list several: data_vendors=\"yfinance,alpha_vantage\""],"exampleFix":"# before\nconfig: {\"data_vendors\": {\"stock_data\": \"alphavantage\"}}  # typo: missing underscore\n# -> ValueError: Configured vendor(s) ['alphavantage'] not available for 'get_stock_data_indicators_adjusted'. Available: ['yfinance', 'alpha_vantage', ...].\n\n# after\nconfig: {\"data_vendors\": {\"stock_data\": \"alpha_vantage\"}}\n# or multi-vendor chain: {\"data_vendors\": {\"stock_data\": \"yfinance,alpha_vantage\"}}","handlingStrategy":"validation","validationCode":"from tradingagents.dataflows.interface import VENDOR_METHODS, TOOLS_CATEGORIES\n\ndef validate_vendor_config(cfg: dict) -> list[str]:\n    problems = []\n    dv = cfg.get(\"data_vendors\", {})\n    tv = cfg.get(\"tool_vendors\", {})\n    for method in (m for i in TOOLS_CATEGORIES.values() for m in i[\"tools\"]):\n        vendors = tv.get(method) or dv.get(TOOLS_CATEGORIES and next(c for c, i2 in TOOLS_CATEGORIES.items() if method in i2[\"tools\"]), \"default\")\n        wanted = [v.strip() for v in (vendors or \"default\").split(\",\") if v.strip() and v != \"default\"]\n        unknown = [v for v in wanted if v not in VENDOR_METHODS.get(method, {})]\n        if wanted and unknown:\n            problems.append(f\"{method}: {unknown} not in {list(VENDOR_METHODS[method])}\")\n    return problems","typeGuard":null,"tryCatchPattern":"try:\n    route_to_vendor(\"get_stock_data_indicators_adjusted\", \"AAPL\", \"2025-06-10\", 10, \"close\")\nexcept ValueError as e:\n    if \"not available for\" in str(e):\n        # fix config: use a vendor from the 'Available:' list in the message\n        fix_data_vendors_from_error(e)\n    raise","preventionTips":["Spell vendor names exactly as registered ('alpha_vantage', with underscore)","Validate your data_vendors/tool_vendors config against VENDOR_METHODS at startup, not mid-run","Use 'default' or omit the setting when you don't need a specific vendor"],"tags":["configuration","routing","vendor-selection","valueerror"],"backgroundTag":null,"analyzedSha":"a33fd4c0f134485a43553a2c23a63cb14adbd88f","analyzedAt":"2026-08-14T19:45:16.920Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}