With Gerrit change 174200,[1] an HTTP header "Api-User-Agent" header will be recognized for logging from the API. This should benefit clients using XMLHttpRequest where the normal User-Agent header is locked down by the browser. The logged agent will be the concatenation of Api-User-Agent and the browser's User-Agent header.
This should come in handy once the ApiFeatureUsage extension[2][3] is reviewed and deployed.
The new header will be recognized starting with 1.25wmf10, see https://www.mediawiki.org/wiki/MediaWiki_1.25/Roadmap for the schedule. It will be ignored for wikis still on 1.25wmf8 or 1.25wmf9, so feel free to upgrade any scripts immediately. Bots and other clients that have full control over the User-Agent header should continue to use that header exclusively.
[1]: https://gerrit.wikimedia.org/r/#/c/174200/ [2]: https://www.mediawiki.org/wiki/Extension:ApiFeatureUsage [3]: https://www.mediawiki.org/wiki/API/Architecture_work/Planning#Deprecated_API...