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
- Configure HTTP proxy environment variables
- 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).
Problem
When
mmxis run behind an HTTP proxy, it fails with "Network request failed" error, even though the proxy environment variables are correctly set.Environment
http://192.168.100.1:7897Environment Variables
Both lowercase and uppercase proxy variables are set:
Steps to Reproduce
mmx quota show(or any API command)Expected Behavior
mmxshould respectHTTP_PROXY/HTTPS_PROXY/ALL_PROXYenvironment variables and route requests through the proxy, just likecurl,wget, and other CLI tools do.Actual Result
Additional Context
curl -x http://192.168.100.1:7897 https://api.minimaxi.com/...works perfectlymmxuses Node.js nativefetch(), which does NOT automatically useHTTP_PROXY/HTTPS_PROXYenvironment variablescurl -xas a wrapper, but this is not idealSuggestion
Consider using a library that properly supports
HTTP_PROXYenvironment variables, or explicitly configure the built-inundiciagent with proxy support (e.g., usingglobalizeagent or similar).