As described in
https://wikitech.wikimedia.org/wiki/Machine_Learning/LiftWing/Usage
The public liftwing endpoint that we currently use should only be used by clients running outside of production. Since we are going to deploy this to production, AutoModerator should use the internal endpoints there and continue to use the external endpoint for local development and patchdemo. The public and private APIs for this model are exactly the same, they just use a slightly different prefix:
internal base url: https://inference.discovery.wmnet:30443/
external base url: https://api.wikimedia.org/service/lw/inference/
I suggest we use configuration that mirrors the ORES extension, eg:
"AutoModeratorLiftWingBaseUrl": { "description": "The base URL of the LiftWing service. We set it by default to use the API Gateway endpoint which is publicly accessible and is modified by mediawiki deployments that run within the production WMF cluster and have access to the internal endpoint.", "value": "https://api.wikimedia.org/service/lw/inference/" }, "AutoModeratorLiftWingAddHostHeader": { "description": "Whether to add the Host header to the LiftWing request. This is required for Lift Wing requests made using the internal endpoint within the WMF infrastructure.", "value": false }, "AutoModeratorLiftWingRevertRiskHostHeader": { "value": "revertrisk-language-agnostic.revertrisk.wikimedia.org", "description": "Hostname to use with header for requests to RevertRisk endpoint." },