-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configurable LiteLLM logging control 🙉 #722
base: main
Are you sure you want to change the base?
Conversation
I could not take the noise anymore Add the ability to control LiteLLM logging through configuration: - Add --enable-litellm CLI flag - Add CODEGATE_ENABLE_LITELLM environment variable - Add external_loggers.litellm config file option - Set logger level to CRITICAL+1 when disabled to suppress all logging - Update documentation with new logging configuration options This change allows users to enable LiteLLM debug logging when needed while keeping it disabled by default to reduce noise.
we could add flags for sqlalchemy, asyncio etc, but I did not want to spend too much time on this and get back to PII |
src/codegate/cli.py
Outdated
@click.option( | ||
"--enable-litellm", | ||
is_flag=True, | ||
default=False, | ||
help="Enable LiteLLM logging (includes LiteLLM Proxy, Router, and core)", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not a big deal, but this feels like a cosmetic change rather than a functional one, only relevant for developers. For example, removing litellm
would make this option useless, and removing it would be a breaking change.
I would avoid exposing this to the end user with an additional option, and rather only rely on environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point! I will make the change.
- `CODEGATE_ENABLE_LITELLM`: enable LiteLLM logging | ||
- `CODEGATE_ENABLE_SQLALCHEMY`: enable SQLAlchemy logging | ||
- `CODEGATE_ENABLE_UVICORN_ERROR`: enable Uvicorn error logging | ||
- `CODEGATE_ENABLE_AIOSQLITE`: enable aiosqlite logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to add the word "logging" to these environment variables. Else, it hints at enabling us disabling a whole component
Add configurable LiteLLM logging control 🙉
I could not take the noise anymore!
Add the ability to control LiteLLM logging through configuration:
- Add --enable-litellm CLI flag
- Add CODEGATE_ENABLE_LITELLM environment variable
- Add external_loggers.litellm config file option
- Set logger level to CRITICAL+1 when disabled to suppress all logging
- Update documentation with new logging configuration options
This change allows users to enable LiteLLM debug logging when needed while keeping it disabled by default to reduce noise.