Commit graph

29 commits

Author SHA1 Message Date
Krish Dholakia
d57be47b0f
Litellm ruff linting enforcement (#5992)
* ci(config.yml): add a 'check_code_quality' step

Addresses https://github.com/BerriAI/litellm/issues/5991

* ci(config.yml): check why circle ci doesn't pick up this test

* ci(config.yml): fix to run 'check_code_quality' tests

* fix(__init__.py): fix unprotected import

* fix(__init__.py): don't remove unused imports

* build(ruff.toml): update ruff.toml to ignore unused imports

* fix: fix: ruff + pyright - fix linting + type-checking errors

* fix: fix linting errors

* fix(lago.py): fix module init error

* fix: fix linting errors

* ci(config.yml): cd into correct dir for checks

* fix(proxy_server.py): fix linting error

* fix(utils.py): fix bare except

causes ruff linting errors

* fix: ruff - fix remaining linting errors

* fix(clickhouse.py): use standard logging object

* fix(__init__.py): fix unprotected import

* fix: ruff - fix linting errors

* fix: fix linting errors

* ci(config.yml): cleanup code qa step (formatting handled in local_testing)

* fix(_health_endpoints.py): fix ruff linting errors

* ci(config.yml): just use ruff in check_code_quality pipeline for now

* build(custom_guardrail.py): include missing file

* style(embedding_handler.py): fix ruff check
2024-10-01 19:44:20 -04:00
Krrish Dholakia
14da2d5ade fix(_logging.py): fix timestamp format for json logs
Outputs timestamp in ISO 8601 format to work with fluentbit
2024-06-20 15:20:21 -07:00
Krish Dholakia
63216f42b8
Merge branch 'main' into litellm_gemini_refactoring 2024-06-17 19:50:56 -07:00
Krrish Dholakia
4cddd1eb31 fix(_logging.py): add loglevel and timestamp to json logs
Fixes https://github.com/BerriAI/litellm/issues/4248
2024-06-17 18:57:20 -07:00
Krrish Dholakia
3d9ef689e7 fix(vertex_httpx.py): check if model supports system messages before sending separately 2024-06-17 17:32:38 -07:00
Krrish Dholakia
be66800a98 feat(main.py): initial commit - refactoring google ai studio to just use vertex httpx
Uses the same calling logic for google ai studio/vertex ai. Simplifies logic, gives google ai studio integration all of vertex
ai features.
2024-06-17 13:31:46 -07:00
Krrish Dholakia
4f91205530 refactor(utils.py): refactor Logging to it's own class. Cut down utils.py to <10k lines.
Easier debugging

 Reference: https://github.com/BerriAI/litellm/issues/4206
2024-06-15 10:57:20 -07:00
Krrish Dholakia
6cca5612d2 refactor: replace 'traceback.print_exc()' with logging library
allows error logs to be in json format for otel logging
2024-06-06 13:47:43 -07:00
Krrish Dholakia
0d3e52373c fix(proxy/_logging.py): fix default logging level 2024-06-05 17:42:49 -07:00
Krrish Dholakia
3167bee25a fix(proxy_cli.py): enable json logging via litellm_settings param on config
allows user to enable json logs without needing to figure out env variables
2024-05-29 21:41:20 -07:00
Krrish Dholakia
52acd3955d fix(_logging.py): support all logs being in json mode, if enabled 2024-05-20 09:22:59 -07:00
Krrish Dholakia
058bfb101d feat(proxy_cli.py): support json logs on proxy
allow user to enable 'json logs' for proxy server
2024-05-20 09:18:12 -07:00
Krrish Dholakia
b46db8b891 feat(utils.py): json logs for raw request sent by litellm
make it easier to view verbose logs in datadog
2024-04-29 19:21:19 -07:00
Krrish Dholakia
7876aa2d75 fix(parallel_request_limiter.py): handle metadata being none 2024-03-14 10:02:41 -07:00
ishaan-jaff
5850ff470f (feat) disable/enable logging 2024-03-08 20:42:12 -08:00
ishaan-jaff
6c13776701 (fix) alerting - show timestamps in alert 2024-01-24 15:25:40 -08:00
ishaan-jaff
47110180c8 (feat) proxy - add timestamp to debug logs 2024-01-24 15:16:18 -08:00
Krrish Dholakia
fd4d65adcd fix(__init__.py): enable logging.debug to true if set verbose is true 2024-01-23 07:32:30 -08:00
Krrish Dholakia
276a685a59 feat(utils.py): support custom cost tracking per second
https://github.com/BerriAI/litellm/issues/1374
2024-01-22 15:15:34 -08:00
Krrish Dholakia
3e5b743b89 fix(caching.py): add logging module support for caching 2024-01-20 17:34:29 -08:00
ishaan-jaff
5d7646b30a (fix) proxy - show detailed_debug logs 2024-01-08 15:34:24 +05:30
ishaan-jaff
b4d9754dc2 (feat) verbose logs + fallbacks - working well 2024-01-08 12:33:09 +05:30
ishaan-jaff
f63f9d02cc (feat) use '-debug' with proxy logger 2024-01-08 10:35:49 +05:30
ishaan-jaff
f9d75233de (feat) move litellm router - to use logging.debug, logging.info 2024-01-08 09:31:29 +05:30
ishaan-jaff
7742950c57 v0 proxy logger 2024-01-08 08:25:04 +05:30
Krrish Dholakia
4905929de3 refactor: add black formatting 2023-12-25 14:11:20 +05:30
ishaan-jaff
762f28e4d7 (fix) make print_verbose non blocking 2023-12-07 17:31:32 -08:00
Krrish Dholakia
8cc0e8e5c5 ci(pre-commit-config.yaml): adding mypy linting as a pre-commit hook 2023-12-06 22:57:14 -08:00
Frank Colson
95e5331090 Use litellm logging convention 2023-12-05 22:28:23 -07:00