mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-02 20:22:10 +00:00
5f40f93846
* fix: inject NPM_CONFIG_CACHE into STDIO MCP subprocess env for Docker npm/npx needs a writable cache directory. In containers the default (~/.npm) may not exist or be read-only, causing STDIO MCP servers launched via npx to fail with ENOENT. Inject NPM_CONFIG_CACHE=/tmp/.npm_mcp_cache into the subprocess env when not already set. * test: add unit test for NPM_CONFIG_CACHE injection in STDIO MCP Verifies that NPM_CONFIG_CACHE is auto-injected when not set, and preserved when explicitly provided. Also moves the import to module level per code style rules. * Update litellm/constants.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Apply suggestion from @greptile-apps[bot] Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>