Skip to content

Upstream updates - #373

Closed
sirsimonson wants to merge 9 commits into
LibreChat-AI:mainfrom
sirsimonson:main
Closed

sirsimonson wants to merge 9 commits into
LibreChat-AI:mainfrom
sirsimonson:main

Conversation

@sirsimonson

Copy link
Copy Markdown

No description provided.

CSI and others added 9 commits September 15, 2026 15:56
- sandbox-runner: target sandbox-build, privileged: true, cap_add, seccomp
- sandbox-runner: KVM_ENABLED=false, SANDBOX_USE_CGROUPV2=false
- Parameterize REDIS_PASSWORD, S3_ACCESS_KEY, S3_SECRET_KEY
- No EGRESS_GATEWAY_URL change needed (NsJail shares host Docker DNS)
Combines local-oci-runtime (NsJail direct mode) with package-builder
runtime packages. No external package mount needed.
- target: sandbox-runner-true (KVM baked, packages included)
- privileged: false, no cap_add needed (libkrun handles isolation)
- EGRESS_GATEWAY_URL=http://localhost:3190 for sandbox-runner only
  (KVM microVM cannot resolve Docker DNS; uses SANDBOX_FORWARD_TARGET)
- api/service-worker keep egress_gateway:3190 (Docker DNS works)
The KVM guest proxies sockets through TSI into the runner container's
network namespace, and the launcher forwards Docker's resolver into
the guest, so the guest resolves and reaches egress_gateway by name.
Pointing EGRESS_GATEWAY_URL at localhost:3190 left nothing listening
in the guest: every artifact upload failed with ConnectionRefused,
responses were pruned to zero file refs, and no files could persist
across executions (artifact_delivery_failed in runner logs).

Reverts the localhost override introduced with the KVM revert.
libkrun's TSI networking cannot reach Docker's embedded DNS (127.0.0.11)
from the guest: UDP resolver queries are refused, so EGRESS_GATEWAY_URL
kept as a service name makes every artifact upload fail with
ConnectionRefused (artifact_delivery_failed, files silently pruned).
The resolv.conf handoff from LibreChat-AI#152 relies on that path and was never
live-tested on a Docker host, regressing the original IP pinning.

Resolve egress/file-server URLs and SANDBOX_FORWARD_TARGET in the
container network namespace at boot and hand the guest literal IPs,
restoring the pre-LibreChat-AI#152 behavior. The resolver handoff is kept for
guest boot validation. Known tradeoff (same as before LibreChat-AI#152): a
restarted egress gateway may move to a new IP until the runner is
redeployed; compose deployments resolve at startup via depends_on.
Coolify's compose parser auto-creates an app-level variable for every
${VAR} reference and injects it into all services. With the reference
named CODEAPI_EGRESS_GRANT_SECRET, hardened mode rejects it on the api
and service-worker (must not be configured) and both crash-loop.

Rename the overridable app variable to
CODEAPI_GATEWAY_EGRESS_GRANT_SECRET; only the egress_gateway service
maps it to CODEAPI_EGRESS_GRANT_SECRET.

@sirsimonson sirsimonson left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

@sirsimonson sirsimonson left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

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.

1 participant