Skip to content

Support axios config#73

Closed
Highnesslin wants to merge 1 commit into
microsoft:mainfrom
Highnesslin:feat/add_axios_config
Closed

Support axios config#73
Highnesslin wants to merge 1 commit into
microsoft:mainfrom
Highnesslin:feat/add_axios_config

Conversation

@Highnesslin

Copy link
Copy Markdown

Some regions require the use of a VPN to connect to GPT. I hope to open up Axios configuration to allow more people to use it.

like this

const agent = new HttpsProxyAgent('http://127.0.0.1:7890');

const model = createLanguageModel({
  OPENAI_API_KEY: 'API_KEY',
  OPENAI_MODEL: 'gpt-3.5-turbo',
}, {
  httpsAgent: agent,
});

@Highnesslin

Copy link
Copy Markdown
Author

@Highnesslin please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@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