Skip to content

feat(http): enable trust_env in creating aiohttp.ClientSession#1236

Open
CyCle1024 wants to merge 2 commits intoMoonshotAI:mainfrom
CyCle1024:fix_https_proxy_login
Open

feat(http): enable trust_env in creating aiohttp.ClientSession#1236
CyCle1024 wants to merge 2 commits intoMoonshotAI:mainfrom
CyCle1024:fix_https_proxy_login

Conversation

@CyCle1024
Copy link

@CyCle1024 CyCle1024 commented Feb 25, 2026

Related Issue

Resolve #1234

Description

Add parameter trust_env=True when creating aiohttp.ClientSession in src/kimi_cli/utils/aiohttp.py.
This would make aiohttp.ClientSession respect environment variable such as https_proxy, HTTPS_PROXY and so on.
By default, trust_env is set False in __init__ funcion of aiohttp.ClientSession.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Copilot AI review requested due to automatic review settings February 25, 2026 09:04
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@CyCle1024 CyCle1024 changed the title [Feat] enable trust_env in creating aiohttp.ClientSession feat(auth) enable trust_env in creating aiohttp.ClientSession Feb 25, 2026

This comment was marked as resolved.

@CyCle1024
Copy link
Author

@RealKai42 please approve workflows, this PR is waiting for reviewing.

This makes the aiohttp client session respect env like `https_proxy`, `http_proxy` and so on.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment variable based proxy is not working due to aiohttp default settings when using kimi login

2 participants