Fixes#20990
PR #19943 added logging when the proxy overrides model names to prevent
internal provider prefixes from leaking to clients. The behavior works
correctly but logs a WARNING on every request with model mismatch.
For high-traffic customers using model aliases or provider prefixes,
this creates millions of warnings per day, flooding logs and causing
disk space issues.
Changed log level from WARNING to DEBUG since:
- The model mismatch is expected behavior when using aliases
- The override happens correctly regardless of log level
- Operators can still enable with LITELLM_LOG=DEBUG for debugging
Changes:
- common_request_processing.py: 2 warnings -> debug (non-streaming)
- proxy_server.py: 1 warning -> debug (streaming)
- Change error message to be generic (works for both server_name and alias)
- Restore 'Defaults to server name with spaces replaced' text in alias tooltip
* 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>
- Update validateMCPServerName to reject both spaces and hyphens
- Apply shared validation to alias field in create form (was inline)
- Update tooltips to mention space restriction
- Ensures consistency across create/edit forms for server_name and alias fields
* Fix MCP health check CancelledError handling for parallel test execution
Add asyncio.CancelledError handler in health_check_server() and missing
@pytest.mark.asyncio decorator on test_mcp_server_manager_config_integration_with_database.
In Python 3.8+, CancelledError inherits from BaseException, not Exception,
so it bypassed the generic exception handler when pytest-xdist cancels
running tasks after a failure.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Regenerate poetry.lock to resolve merge conflict markers
The lock file had unresolved conflict markers from a previous merge,
causing poetry to fail with "Invalid statement (at line 8534, column 1)".
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>