Skip to content

A network error occurred while running the example #117

Closed

Description

@ybsun0215

cause: Error: connect ETIMEDOUT 199.59.150.49:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
errno: -4039,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '199.59.150.49',
port: 443

Due to my use of VPN, I have set up HTTP_ Proxy, but it doesn't seem to work, and the code still reports errors.

Activity

  1. changed the title [-]There was a network error running example[/-] [+]A network error occurred while running the example[/+] on Sep 2, 2023
  2. robgruen commented on Oct 12, 2026

    @robgruen
    Contributor

    Thanks for reporting this. The missing proxy support described here is now addressed by #382, merged on July 7, 2026.

    createLanguageModel(process.env) now honors HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY (including lowercase variants), together with NO_PROXY. Requests are routed through an undici dispatcher supported by Node's native fetch.

    To use the fix, update TypeChat and install the optional proxy dependency:

    npm install typechat@latest undici

    Configure the appropriate standard proxy variable in your environment or .env file. For an HTTPS model endpoint, for example:

    HTTPS_PROXY=http://127.0.0.1:7890

    Replace that address with your actual proxy. If you call createOpenAILanguageModel or createAzureOpenAILanguageModel directly rather than using createLanguageModel, pass the proxy explicitly through the options argument as { proxyUrl }.

    See the proxy setup documentation.

    Closing as completed by #382. This addresses TypeChat ignoring proxy settings; it does not rule out separate VPN or proxy-connectivity problems, and we have not re-tested the original VPN setup. If the timeout persists with the updated version and a working proxy, please comment with the details so we can investigate further.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions