Skip to content

Add HTTP_PROXY variable and proxy process when access endpoints' api services#55

Closed
lingchuL wants to merge 4 commits into
microsoft:mainfrom
lingchuL:main
Closed

Add HTTP_PROXY variable and proxy process when access endpoints' api services#55
lingchuL wants to merge 4 commits into
microsoft:mainfrom
lingchuL:main

Conversation

@lingchuL

Copy link
Copy Markdown

Some area and use cases can't access to endpoints' services directly, like OpenAI's api.
I add some process to let the code read HTTP_PROXY enviroment variable from .env file first (if it was set), and use proxy to access endpoints' services and api, when createLanguageModel.

@lingchuL

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="ShelterFuture"

@lingchuL

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="ShelterFuture"

@robgruen

robgruen commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

superseded by #382

@robgruen robgruen closed this Jul 6, 2026
robgruen added a commit that referenced this pull request Jul 7, 2026
…382)

* Add fetch-native proxy support (HTTPS_PROXY / HTTP_PROXY / NO_PROXY)

Route model requests through a proxy using undici's ProxyAgent as the fetch dispatcher. createLanguageModel auto-detects the standard HTTPS_PROXY / HTTP_PROXY / ALL_PROXY variables and honors NO_PROXY via EnvHttpProxyAgent; createOpenAILanguageModel and createAzureOpenAILanguageModel accept an explicit { proxyUrl } via a new LanguageModelOptions argument. undici is an optional, lazily-imported dependency, so non-proxy users are unaffected.

Supersedes #55 and #73, which were built on the removed axios stack.

* Fold useResponsesApi into LanguageModelOptions

Replace the positional useResponsesApi parameter on createOpenAILanguageModel with a useResponsesApi field on LanguageModelOptions, collapsing the trailing (flag, options) pair into a single options bag. Neither the parameter nor the options object shipped in the published 0.1.2, so this is not a breaking change.

* Bump typechat version to 0.1.3

* Fix pyright CI failure: pin pytest<9 for syrupy 5.x compatibility

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix pyright CI pytest plugin failure by adding pytest-xdist

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants