Skip to content

mmx CLI does not respect HTTP_PROXY / HTTPS_PROXY environment variables #96

@toddlerya

Description

@toddlerya

Problem

When mmx is run behind an HTTP proxy, it fails with "Network request failed" error, even though the proxy environment variables are correctly set.

Environment

  • macOS
  • Node.js 22.20.0 (bundled with mmx CLI)
  • mmx version: 1.0.7
  • Proxy: HTTP proxy at http://192.168.100.1:7897

Environment Variables

Both lowercase and uppercase proxy variables are set:

export http_proxy="http://192.168.100.1:7897"
export https_proxy="http://192.168.100.1:7897"
export HTTP_PROXY="http://192.168.100.1:7897"
export HTTPS_PROXY="http://192.168.100.1:7897"
export ALL_PROXY="http://192.168.100.1:7897"

Steps to Reproduce

  1. Configure HTTP proxy environment variables
  2. Run mmx quota show (or any API command)

Expected Behavior

mmx should respect HTTP_PROXY / HTTPS_PROXY / ALL_PROXY environment variables and route requests through the proxy, just like curl, wget, and other CLI tools do.

Actual Result

Error: Network request failed.
  Check your network connection and proxy settings. Also verify MINIMAX_BASE_URL is a valid URL.
  (exit code 6)

Additional Context

  • curl -x http://192.168.100.1:7897 https://api.minimaxi.com/... works perfectly
  • Other tools using system proxy (curl, wget, etc.) work fine
  • It appears mmx uses Node.js native fetch(), which does NOT automatically use HTTP_PROXY/HTTPS_PROXY environment variables
  • A workaround is to use curl -x as a wrapper, but this is not ideal

Suggestion

Consider using a library that properly supports HTTP_PROXY environment variables, or explicitly configure the built-in undici agent with proxy support (e.g., using globalize agent or similar).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions