There is no discrimination here, The logic you see here is used to auto separate users that use AWS and Tencent Provider, and for users from China Tencent is the default provider.
We decide to make Tencent as the default provider in China as we cooperate with Tencent closely to provide the best experience for most users from China, and user may easily switch back to AWS if they wish by set SERVERLESS_PLATFORM_VENDOR to aws or SLS_GEO_LOCATION to anywhere else than cn.
We need to know if a user is from China, then we will show CLI context in Chinese to make it easier for users from China use the CLI and understand help info we want to tell users.
Technically, we have have different architecture on AWS and Tencent, as the infrastructure is different, so we have different CLI (Framework CLI and Component CLI) to help user using serverless, to make user has the best experience, we nested the components CLI in the Framework CLI , they all will be triggered by commands serverless or sls, with geo location info we can easily find the correct CLI for all Serverless users.
We worked a lot to improve the experience of users from China, not only the Chinese content, but also the user scenarios that China users preferred (eg: easy deploy WEB framework app to serverless, like Express, Flask, ThinkPHP).
Hope this give you a clear idea why we check geo location and vendor info in our code, please let me know if you have future questions.