mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7652] [Issue]: LLM requests ignore HTTP_PROXY / HTTPS_PROXY when using custom Undici dispatcher #4235
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @OkkamaSoul on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7652
Originally assigned to: @SpicyMarinara on GitHub.
Summary
HTTP proxy support for LLM API requests appears to have broken after recent updates to the staging branch. The same configuration worked correctly before these updates, with no changes to the proxy setup.
LLM API requests fail with
fetch failedwhen Marinara Engine is configured to use an HTTP proxy viaHTTP_PROXY,HTTPS_PROXY, andNODE_USE_ENV_PROXY=1.Model listing works correctly, but message generation fails. The issue appears to be caused by
safeFetch()using a custom UndiciAgentthat bypasses Node.js environment proxy settings.The same API and proxy configuration works in Hermes. Enabling TUN mode in v2rayN immediately resolves the issue.
Expected behavior
Marinara Engine should respect the
HTTP_PROXYandHTTPS_PROXYenvironment variables whenNODE_USE_ENV_PROXY=1is enabled, including for LLM API requests handled bysafeFetch().Both model listing and message generation should work through the configured proxy without requiring system-wide TUN mode.
Actual behavior
https://api.rout.my/v1/modelssucceeds.fetch failedafter approximately 10 seconds./v1/responses) and Custom OAI-Compatible provider (/v1/chat/completions).Suspected cause: The custom Undici
Agentcreated insafeFetch()may override Node.js built-in environment proxy handling when passed explicitly as adispatcher.Steps to reproduce
Configure v2rayN with a local HTTP proxy at
127.0.0.1:10808, with TUN mode disabled.Launch Marinara Engine using the following batch file:
set "NODE_USE_ENV_PROXY=1"
set "HTTP_PROXY=http://127.0.0.1:10808"
set "HTTPS_PROXY=http://127.0.0.1:10808"
set "NO_PROXY=localhost,127.0.0.1,192"
Logs, screenshots, or video
OpenAI provider — Responses API:
Custom provider — Chat Completions API:
@SpicyMarinara commented on GitHub (Oct 16, 2026):
Working on this in #7729.