{"record":{"id":"3c19236c79c58565","repo":"BerriAI/litellm","slug":"authentication-error-e-3c1923","errorCode":null,"errorMessage":"Authentication Error({e})","messagePattern":"Authentication Error\\((.+?)\\)","errorType":"http","errorClass":"ProxyException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/model_management_endpoints.py","lineNumber":1655,"sourceCode":"                    user_api_key_dict=user_api_key_dict,\n                    table_name=LitellmTableNames.PROXY_MODEL_TABLE_NAME,\n                    before_value=result.model_dump_json(exclude_none=True),\n                    after_value=None,\n                    litellm_changed_by=user_api_key_dict.user_id,\n                    litellm_proxy_admin_name=LITELLM_PROXY_ADMIN_NAME,\n                )\n            )\n            return {\"message\": f\"Model: {result.model_id} deleted successfully\"}\n        else:\n            raise HTTPException(\n                status_code=500,\n                detail={\"error\": \"Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature.\"},\n            )\n\n    except Exception as e:\n        verbose_proxy_logger.exception(\"Failed to delete model. Due to error - %s\", e)\n        if isinstance(e, HTTPException):\n            raise ProxyException(\n                message=getattr(e, \"detail\", f\"Authentication Error({e})\"),\n                type=ProxyErrorTypes.auth_error,\n                param=getattr(e, \"param\", \"None\"),\n                code=getattr(e, \"status_code\", status.HTTP_400_BAD_REQUEST),\n            )\n        elif isinstance(e, ProxyException):\n            raise e\n        raise ProxyException(\n            message=\"Authentication Error, \" + str(e),\n            type=ProxyErrorTypes.auth_error,\n            param=getattr(e, \"param\", \"None\"),\n            code=status.HTTP_400_BAD_REQUEST,\n        )\n\n\nasync def delete_team_model_alias(\n    public_model_name: str,\n    prisma_client: PrismaClient,","sourceCodeStart":1637,"sourceCodeEnd":1673,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_management_endpoints.py#L1637-L1673","documentation":"Error-conversion point in model delete: an HTTPException raised inside the try block is re-wrapped as a ProxyException with type auth_error and the original detail (or this generic 'Authentication Error' fallback) as the message; the underlying e is interpolated for the log.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1655 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the provider credentials in litellm_params (API key, base URL).","Check proxy server logs for the underlying auth error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}