mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6268] [Issue]: Custom OAI-compatible connection to LM Studio returns 502 on Fetch Models #3500
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#3500
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 @bisqweet on GitHub (Sep 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6268
Originally assigned to: @SpicyMarinara on GitHub.
Environment
Problem
Adding a Custom (OAI-Compatible) connection pointing at LM Studio's local server (
http://localhost:1234/v1) fails on "Fetch Models from API" with the error:Browser DevTools Console shows:
What works
LM Studio's OpenAI-compatible API is confirmed working:
http://localhost:1234/v1/modelsreturns the correct JSON with the model list from both the browser address bar andcurl.What does NOT work
localhost:1234/v1or127.0.0.1:1234/v1.Marinara connection settings used
http://localhost:1234/v1LM Studio settings
Access details
http://localhost:7860/http://localhost:1234/Admin secret context (possibly related)
Privileged API actions (e.g. Restart Server) also fail with
ADMIN_SECRET is required for privileged APIs, even though:ADMIN_SECRETis set in.envMARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACK=falseTRUSTED_PRIVATE_NETWORKS=127.0.0.1/32,::1/128X-Admin-Secretheader is sent on the failing requesthttp://localhost:7860/Both the 502 and the ADMIN_SECRET failures might share a root cause in the backend's privileged-gate / proxy middleware. Flagging in case it's the same bug.
Request
Any guidance on:
@SpicyMarinara commented on GitHub (Sep 17, 2026):
Owner: @SpicyMarinara. Codex is addressing this in draft PR #6282 as part of the requested issue sweep. Focused implementation and regression/browser verification are in progress.
@SpicyMarinara commented on GitHub (Sep 17, 2026):
PR #6282 adds useful diagnostics without weakening outbound URL validation: the UI includes the socket/DNS error code (for example ECONNREFUSED), and the server log retains the underlying cause. Regression coverage exercises keyless custom model discovery through both localhost and 127.0.0.1, plus a stopped local provider.
Both working loopback cases pass on the current code. This does not reproduce the reported Windows/LM Studio failure, so I am leaving this issue open. The ADMIN_SECRET rejection is a separate configuration/authentication path; there is no evidence connecting it to the model-fetch failure.
The next useful evidence is the network code and matching server log from the affected Windows installation after #6282 lands, plus whether that Marinara process runs natively, under WSL, or in a container. The browser and curl checks alone do not establish reachability from the actual server process.