Skip to content

feat(e2e): add FORWARD-mode proxy E2E test for custom OpenAI-compatible endpoints #2572

@jyaunches

Description

@jyaunches

Problem

All E2E inference goes through the DNS-rewritten NVIDIA Endpoints path. Custom OpenAI-compatible endpoints (deepinfra, together.ai, etc.) use the FORWARD-mode proxy branch in nemoclaw-blueprint/scripts/http-proxy-fix.js, which is never exercised in E2E.

Bug 3 of the weekend regression (#2490) — forward-proxy fields leaking into https.request — was only discovered by a community user (mflova) on Discord after upgrading from 0.0.23 to 0.0.24. No existing or planned E2E test would have caught it.

PR #2490 added unit-level bisect-proof tests (http-proxy-fix-rewrite.test.ts, http-proxy-fix-e2e.test.ts) that pin every stripped field. But the full sandbox → gateway → proxy → upstream path through FORWARD-mode is not exercised.

Proposal

Add a forward-proxy-e2e nightly job that:

  1. Onboards with a custom compatible-endpoint provider pointing to a local mock HTTPS server (or a known free endpoint)
  2. Sends a chat completion request through the sandbox
  3. Verifies the request reaches the upstream without forward-proxy field contamination
  4. Verifies the response returns through the proxy without corruption

The mock server approach is simplest: spin up a tiny Node HTTPS server on the host that echoes back headers, configure NEMOCLAW_COMPATIBLE_ENDPOINT_URL to point at it, and assert the request headers do not contain Proxy-Authorization, agent, socketPath, or other hop-by-hop fields.

What This Would Have Caught

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    04-25-regressionIssues raised from the Apr 25 weekend regression analysisarea: ciCI workflows, checks, release automation, or GitHub Actionsarea: e2eEnd-to-end tests, nightly failures, or validation infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions