Skip to content

refactor(logging): preserve explicit LiteLLM logger levels#10

Merged
fcogidi merged 2 commits into
mainfrom
refactor/litellm_logging
May 12, 2026
Merged

refactor(logging): preserve explicit LiteLLM logger levels#10
fcogidi merged 2 commits into
mainfrom
refactor/litellm_logging

Conversation

@fcogidi
Copy link
Copy Markdown
Collaborator

@fcogidi fcogidi commented May 12, 2026

Summary

Preserves explicit LiteLLM caller-configured logging level when constructing LMClient, while keeping infermesh quiet by default.

Clickup Ticket(s): N/A

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change
  • 📝 Documentation update
  • 🔧 Refactoring
  • ⚡ Performance improvement
  • 🧪 Test improvements
  • 🔒 Security fix

Changes Made

  • Preserved caller-configured LiteLLM verbose logger levels, including DEBUG.
  • Kept the default quiet behavior by setting LiteLLM loggers to WARNING only when unconfigured.
  • Added regression tests for debug preservation and default logger behavior.

Testing

  • Tests pass locally (uv run pytest tests/)
  • Type checking passes (uv run mypy <src_dir>)
  • Linting passes (uv run ruff check src_dir/)
  • Manual testing performed (describe below)

Manual testing details:

  • Ran uv run pytest tests/test_client_runtime.py successfully.
  • Verified litellm._turn_on_debug() before LMClient(...) now emits LiteLLM DEBUG traces during a failing local request.

Screenshots/Recordings

N/A

Related Issues

N/A

Deployment Notes

No deployment steps or migrations required.

Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Documentation updated (if applicable)
  • No sensitive information (API keys, credentials) exposed

@fcogidi fcogidi self-assigned this May 12, 2026
@fcogidi fcogidi merged commit 1004072 into main May 12, 2026
11 checks passed
@fcogidi fcogidi deleted the refactor/litellm_logging branch May 12, 2026 21:41
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.

1 participant