{"record":{"id":"05fbe7e5f917856a","repo":"OpenBB-finance/OpenBB","slug":"provider-fallback-failed-providers-msg","errorCode":null,"errorMessage":"Provider fallback failed.\n[Providers]\n  {msg}","messagePattern":"Provider fallback failed\\.\n\\[Providers\\]\n  (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/app/static/container.py","lineNumber":113,"sourceCode":"        if choice is None:\n            commands = self._command_runner.user_settings.defaults.commands\n            providers = (\n                commands.get(command, {}).get(\"provider\", []) or default_priority\n            )\n            tries = []\n            if len(providers) == 1:\n                return providers[0]\n            for p in providers:\n                result = self._check_credentials(p)\n                if result:\n                    return p\n                if result is False:\n                    tries.append((p, \"missing credentials\"))\n                else:\n                    tries.append((p, f\"not installed, please install openbb-{p}\"))\n\n            msg = \"\\n  \".join([f\"* '{pair[0]}' -> {pair[1]}\" for pair in tries])\n            raise OpenBBError(f\"Provider fallback failed.\\n[Providers]\\n  {msg}\")\n        return choice\n","sourceCodeStart":95,"sourceCodeEnd":115,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/app/static/container.py#L95-L115","documentation":"Raised by Container._get_provider when no explicit provider was chosen and every provider in the resolved priority list failed the credential check. For each candidate it runs _check_credentials: True means usable, False means the provider is registered but its required credentials (e.g. API keys) are empty, and None means the provider package is not installed. The message lists each provider with its failure reason.","triggerScenarios":"Calling a router command such as obb.equity.price.historical(symbol='AAPL') without provider= while (a) every available provider's API keys are unset in user settings, or (b) providers in the defaults list (e.g. 'benzinga', 'fmp') have no openbb-<name> package installed. Also triggered when user_settings.defaults.commands['equity.price.historical']['provider'] lists only providers whose keys are missing.","commonSituations":"Fresh install with no API keys configured; uninstalling a provider package but leaving it in the defaults priority list; a wrong key name in openbb_settings.json or OPENBB_<PROVIDER>_API_KEY env vars; multiple providers configured but all keys blank.","solutions":["Set at least one provider's credentials, e.g. obb.user.credentials.fmp_api_key = 'KEY' or export OPENBB_FMP_API_KEY=..., then retry the command","Or pass an explicit provider whose credentials are already set: obb.equity.price.historical('AAPL', provider='yfinance')","Install the missing provider package shown in the 'not installed' branch: pip install openbb-benzinga","Fix the defaults priority list in openbb_settings.json so it only contains installed, credentialed providers"],"exampleFix":"# before\nres = obb.equity.price.historical('AAPL')  # Provider fallback failed.\n\n# after\nobb.user.credentials.fmp_api_key = 'YOUR_KEY'\nres = obb.equity.price.historical('AAPL', provider='fmp')","handlingStrategy":"validation","validationCode":"from openbb import obb\n\ndef has_working_provider(command: str, providers: list[str]) -> bool:\n    creds = obb.account._credentials  # or inspect obb.user.credentials model dump\n    return any(p in obb.coverage.providers for p in providers)","typeGuard":null,"tryCatchPattern":"from openbb_core.app.model.abstract.error import OpenBBError\n\ntry:\n    res = obb.equity.price.historical('AAPL')\nexcept OpenBBError as e:\n    if 'Provider fallback failed' in str(e):\n        # configure credentials or pick provider explicitly\n        obb.user.credentials.fmp_api_key = KEY\n        res = obb.equity.price.historical('AAPL', provider='fmp')\n    else:\n        raise","preventionTips":["Configure at least one provider's API key at startup and pass provider= explicitly","Check obb.coverage.providers before calling commands in scripts","Validate credentials exist: any(getattr(obb.user.credentials, f, None) for f in required_fields)"],"tags":["openbb","providers","credentials","configuration"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}