What version of Kimi Code CLI is running?
kimi, version 1.13.0
Which open platform/subscription were you using?
Kimi Code
Which model were you using?
kimi-for-coding
What platform is your computer?
Linux 5.15.0-89-generic x86_64 x86_64
What issue are you seeing?
I'm using kimi-cli on remote machine, and I must using https proxy to access internet. When I running command kimi login, it hangs for a while and then show error:
Login failed: Connection timeout to host https://auth.kimi.com/api/oauth/device_authorization
What steps can reproduce the bug?
In a container with only https proxy url based internet access, just run kimi login.
What is the expected behavior?
No response
Additional information
After I do some debugging, I found the hang problem is caused by the following code:
https://github.com/MoonshotAI/kimi-cli/blob/1.13.0/src/kimi_cli/auth/oauth.py#L314-L321
aiohttp session post a request to the url, but the default param trust_env of aiohttp.ClientSession is False, see
https://github.com/MoonshotAI/kimi-cli/blob/1.13.0/src/kimi_cli/utils/aiohttp.py#L12 and
https://github.com/aio-libs/aiohttp/blob/50241d68c1133875ad98a6eadbc71d03ea4b2e0c/aiohttp/client.py#L331. It would not respect environment variable based proxy url setting such as HTTPS_PROXY or https_proxy.
What version of Kimi Code CLI is running?
kimi, version 1.13.0
Which open platform/subscription were you using?
Kimi Code
Which model were you using?
kimi-for-coding
What platform is your computer?
Linux 5.15.0-89-generic x86_64 x86_64
What issue are you seeing?
I'm using kimi-cli on remote machine, and I must using https proxy to access internet. When I running command
kimi login, it hangs for a while and then show error:What steps can reproduce the bug?
In a container with only https proxy url based internet access, just run
kimi login.What is the expected behavior?
No response
Additional information
After I do some debugging, I found the hang problem is caused by the following code:
https://github.com/MoonshotAI/kimi-cli/blob/1.13.0/src/kimi_cli/auth/oauth.py#L314-L321
aiohttp session post a request to the url, but the default param
trust_envof aiohttp.ClientSession is False, seehttps://github.com/MoonshotAI/kimi-cli/blob/1.13.0/src/kimi_cli/utils/aiohttp.py#L12 and
https://github.com/aio-libs/aiohttp/blob/50241d68c1133875ad98a6eadbc71d03ea4b2e0c/aiohttp/client.py#L331. It would not respect environment variable based proxy url setting such as
HTTPS_PROXYorhttps_proxy.