Skip to content

fix: change model mismatch logs from WARNING to DEBUG#20994

Merged
AlexsanderHamir merged 1 commit intoBerriAI:mainfrom
milan-berri:fix/issue-20990-model-mismatch-debug-logs
Feb 13, 2026
Merged

fix: change model mismatch logs from WARNING to DEBUG#20994
AlexsanderHamir merged 1 commit intoBerriAI:mainfrom
milan-berri:fix/issue-20990-model-mismatch-debug-logs

Conversation

@milan-berri
Copy link
Collaborator

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

Relevant issues

Fixes #20990

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🐛 Bug Fix

Changes

  • common_request_processing.py: 2 warnings -> debug (non-streaming)
  • proxy_server.py: 1 warning -> debug (streaming)

Fixes BerriAI#20990

PR BerriAI#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)
@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 11, 2026 9:45pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

Downgrades 3 model-mismatch log messages from WARNING to DEBUG across the non-streaming (common_request_processing.py) and streaming (proxy_server.py) response paths. The model override behavior is unchanged — only the log level is reduced. This prevents log flooding for high-traffic deployments that use model aliases or provider prefixes, where mismatches are expected.

  • common_request_processing.py: 2 WARNING → DEBUG (dict and object response branches)
  • proxy_server.py: 1 WARNING → DEBUG (streaming chunk branch)
  • Minor: a comment in proxy_server.py still references "This warning" — should say "This debug log"

Confidence Score: 5/5

  • This PR is safe to merge — it only changes log levels with no behavioral impact.
  • The change is minimal (3 lines), purely cosmetic (log level only), and the override logic is completely untouched. No new code paths, no new dependencies, no risk of regression.
  • No files require special attention.

Important Files Changed

Filename Overview
litellm/proxy/common_request_processing.py Two verbose_proxy_logger.warning() calls changed to .debug() for model mismatch override messages. No behavioral change.
litellm/proxy/proxy_server.py One verbose_proxy_logger.warning() changed to .debug() for streaming chunk model mismatch. Stale comment still references "warning".

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Additional Comments (1)

litellm/proxy/proxy_server.py
Stale comment — still says "This warning is intentionally verbose" but the log is now DEBUG level.

    # Note: This debug log is intentionally verbose. A mismatch is a useful signal that an

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Logs full of "streaming chunk model mismatch" and "response model mismatch"

2 participants