Prerequisites
Bug Description
When CodeMie CLI is used behind an authenticated enterprise HTTPS proxy, an
assistant-list request fails. The CLI reports API error: HTTP 500 error, but
the underlying Axios error is ERR_FR_TOO_MANY_REDIRECTS.
The same authenticated API request succeeds with curl through the same proxy.
This makes the CLI unusable in this common enterprise-network configuration.
Steps to Reproduce
-
Configure an AI/Run SSO profile that can list assistants.
-
Use an HTTPS API deployment reachable only through an enterprise HTTP proxy.
-
Export both HTTP_PROXY and HTTPS_PROXY to the same proxy URL.
-
Run:
codemie sdk assistants list --projects example-project --page 0 --per-page 5 --json
-
The CLI reports API error: HTTP 500 error.
Expected Behavior
The CLI should return the assistant list through the configured HTTPS proxy, or
surface the actual proxy/redirect error rather than misclassifying it as HTTP
500.
Actual Behavior
The SDK sends the expected request to /v1/assistants with the expected
visible_to_user scope and project filter. Removing the SDK response error
wrapper shows:
Error [ERR_FR_TOO_MANY_REDIRECTS]
Maximum number of redirects exceeded
Stopping redirects after the first response shows a 301 redirect to the same
resource with an explicit :443 authority. Following it through the proxy
loops. The SDK catches the network error with no HTTP response and converts it
to the misleading generic message HTTP 500 error.
By contrast, an authenticated curl request through the same proxy returns HTTP
200 and JSON from /v1/assistants.
Environment
- CodeMie CLI:
0.15.1
- Bundled
codemie-sdk: 0.1.613
- Node.js:
v24.15.0
- OS: Windows WSL2 (Linux guest)
- Provider: AI/Run SSO
Configuration (Redacted)
{
"version": 2,
"activeProfile": "default",
"profiles": {
"default": {
"provider": "ai-run-sso",
"baseUrl": "https://[redacted]/code-assistant-api"
}
}
}
Suggested areas to investigate
- Axios/follow-redirects behavior when
HTTPS_PROXY is set.
- Interaction between the SDK's custom
httpsAgent and environment proxy
support.
- Preserve the original transport error rather than converting missing-response
errors into HTTP 500 error.
Prerequisites
Bug Description
When CodeMie CLI is used behind an authenticated enterprise HTTPS proxy, an
assistant-list request fails. The CLI reports
API error: HTTP 500 error, butthe underlying Axios error is
ERR_FR_TOO_MANY_REDIRECTS.The same authenticated API request succeeds with curl through the same proxy.
This makes the CLI unusable in this common enterprise-network configuration.
Steps to Reproduce
Configure an AI/Run SSO profile that can list assistants.
Use an HTTPS API deployment reachable only through an enterprise HTTP proxy.
Export both
HTTP_PROXYandHTTPS_PROXYto the same proxy URL.Run:
The CLI reports
API error: HTTP 500 error.Expected Behavior
The CLI should return the assistant list through the configured HTTPS proxy, or
surface the actual proxy/redirect error rather than misclassifying it as HTTP
500.
Actual Behavior
The SDK sends the expected request to
/v1/assistantswith the expectedvisible_to_userscope and project filter. Removing the SDK response errorwrapper shows:
Stopping redirects after the first response shows a 301 redirect to the same
resource with an explicit
:443authority. Following it through the proxyloops. The SDK catches the network error with no HTTP response and converts it
to the misleading generic message
HTTP 500 error.By contrast, an authenticated curl request through the same proxy returns HTTP
200 and JSON from
/v1/assistants.Environment
0.15.1codemie-sdk:0.1.613v24.15.0Configuration (Redacted)
{ "version": 2, "activeProfile": "default", "profiles": { "default": { "provider": "ai-run-sso", "baseUrl": "https://[redacted]/code-assistant-api" } } }Suggested areas to investigate
HTTPS_PROXYis set.httpsAgentand environment proxysupport.
errors into
HTTP 500 error.