[BUG] NO_PROXY stopped working in 2.1.23
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Starting in 2.1.23 and continuing through 2.1.29 my NO_PROXY settings are being ignored and the proxy is being used for my ANTHROPIC_BASE_URL.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
"ANTHROPIC_MODEL": "anthropic.claude-sonnet-4-5-20250929-v1:0",
"ANTHROPIC_BASE_URL": "https://my-litelllm-endpoint.example.com",
"DISABLE_AUTOUPDATER": "1",
"ANTHROPIC_AUTH_TOKEN": "litellm token",
"NO_PROXY": "127.0.0.1,.example.com",
"HTTPS_PROXY": "http://myproxy.somedomain.com:8080/",
"HTTP_PROXY": "http://myproxy.somedomain.com:8080/",
"DISABLE_INSTALLATION_CHECKS": "1"
}
}
With 2.1.22 and before traffic to my ANTHROPIC_BASE_URL would not pass through the proxy because I included .example.com in my NO_PROXY settings. Starting with 2.1.23, the proxy is used when trying to connect to my ANTHROPIC_BASE_URL .
What Should Happen?
Claude Code should not use the PROXY when the ANTHROPIC_BASE_URL's domain is in NO_PROXY.
Error Messages/Logs
I get errors from my proxy
Steps to Reproduce
With a LiteLLM endpoint setup your proxy and exclude that endpoint from your proxy via NO_PROXY. You will see that the proxy is being used for accessing the ANTHROPIC_BASE_URL
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
"ANTHROPIC_MODEL": "anthropic.claude-sonnet-4-5-20250929-v1:0",
"ANTHROPIC_BASE_URL": "https://my-litelllm-endpoint.example.com",
"DISABLE_AUTOUPDATER": "1",
"ANTHROPIC_AUTH_TOKEN": "litellm token",
"NO_PROXY": "127.0.0.1,.example.com",
"HTTPS_PROXY": "http://myproxy.somedomain.com:8080/",
"HTTP_PROXY": "http://myproxy.somedomain.com:8080/",
"DISABLE_INSTALLATION_CHECKS": "1"
}
}
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.22
Claude Code Version
2.1.29 (Claude Code)
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 13 comments on GitHub. Read the full discussion on GitHub ↗