n8n icon indicating copy to clipboard operation
n8n copied to clipboard

Langchain nodes not respecting HTTP proxy settings

Open rasmusson opened this issue 5 months ago • 7 comments

Bug Description

When using a Langchain models like OpenAI and Gemini, HTTP calls going to the models online does not use the HTTP proxy defined for N8N. But go straight to the internet.

I found this as my N8N is not allowed to access internet directly. Allowing direct access resolves the issue

To Reproduce

  1. Setup n8n to use a HTTP proxy using environmental variables HTTP_PROXY and HTTPS_PROXY.
  2. Turn off access to internet except through proxy
  3. Set up and run a simple AI flow using chat trigger, conversational agent and OpenAI model.

Expected behavior

Preferably, the AI model nodes should use the proxy defined for n8n. If not there should be a possibility to configure proxy separately for these nodes

Operating System

Docker

n8n Version

1.59.3

Node.js Version

Provided by docker image

Database

SQLite (default)

Execution mode

main (default)

rasmusson avatar Sep 20 '24 12:09 rasmusson