{"record":{"id":"ec42ab3878e5a03a","repo":"BerriAI/litellm","slug":"authenticationerror-exception-provider-error","errorCode":null,"errorMessage":"AuthenticationError: {exception_provider} - {error_str}","messagePattern":"AuthenticationError: (.+?) - (.+?)","errorType":"exception","errorClass":"AuthenticationError","httpStatus":401,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":2090,"sourceCode":"    model: str,\n    original_exception: _ProviderHTTPException,\n    custom_llm_provider: str,\n    error_str: str,\n    exception_type: str,\n    exception_provider: str,\n    extra_information: str,\n) -> None:\n    if hasattr(original_exception, \"status_code\"):\n        if original_exception.status_code == 400:\n            raise BadRequestError(\n                message=f\"{exception_provider} - {error_str}\",\n                llm_provider=custom_llm_provider,\n                model=model,\n                response=getattr(original_exception, \"response\", None),\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 401:\n            raise AuthenticationError(\n                message=f\"AuthenticationError: {exception_provider} - {error_str}\",\n                llm_provider=custom_llm_provider,\n                model=model,\n                response=getattr(original_exception, \"response\", None),\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 404:\n            raise NotFoundError(\n                message=f\"NotFoundError: {exception_provider} - {error_str}\",\n                model=model,\n                llm_provider=custom_llm_provider,\n                response=getattr(original_exception, \"response\", None),\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 408:\n            raise Timeout(\n                message=f\"Timeout Error: {exception_provider} - {error_str}\",\n                model=model,","sourceCodeStart":2072,"sourceCodeEnd":2108,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/exception_mapping_utils.py#L2072-L2108","documentation":"Error \"AuthenticationError: {exception_provider} - {error_str}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:2090 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the provider API key/credentials."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}