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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
Author

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

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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.

@CyCle1024 CyCle1024 force-pushed the fix_https_proxy_login branch from 195525e to fd43808 Compare March 12, 2026 13:06
devin-ai-integration[bot]

This comment was marked as resolved.

This makes the aiohttp client session respect env like `https_proxy`, `http_proxy` and so on.
@CyCle1024 CyCle1024 force-pushed the fix_https_proxy_login branch from 2ae1af7 to b7ed408 Compare April 3, 2026 17:12
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