Krish Dholakia
9b7ebb6a7d
build(pyproject.toml): add new dev dependencies - for type checking ( #9631 )
...
* build(pyproject.toml): add new dev dependencies - for type checking
* build: reformat files to fit black
* ci: reformat to fit black
* ci(test-litellm.yml): make tests run clear
* build(pyproject.toml): add ruff
* fix: fix ruff checks
* build(mypy/): fix mypy linting errors
* fix(hashicorp_secret_manager.py): fix passing cert for tls auth
* build(mypy/): resolve all mypy errors
* test: update test
* fix: fix black formatting
* build(pre-commit-config.yaml): use poetry run black
* fix(proxy_server.py): fix linting error
* fix: fix ruff safe representation error
2025-03-29 11:02:13 -07:00
Krish Dholakia
2f08341a08
Litellm dev readd prompt caching ( #7299 )
...
* fix(router.py): re-add saving model id on prompt caching valid successful deployment
* fix(router.py): introduce optional pre_call_checks
isolate prompt caching logic in a separate file
* fix(prompt_caching_deployment_check.py): fix import
* fix(router.py): new 'async_filter_deployments' event hook
allows custom logger to filter deployments returned to routing strategy
* feat(prompt_caching_deployment_check.py): initial working commit of prompt caching based routing
* fix(cooldown_callbacks.py): fix linting error
* fix(budget_limiter.py): move budget logger to async_filter_deployment hook
* test: add unit test
* test(test_router_helper_utils.py): add unit testing
* fix(budget_limiter.py): fix linting errors
* docs(config_settings.md): add 'optional_pre_call_checks' to router_settings param docs
2024-12-18 15:13:49 -08:00
Ishaan Jaff
7463dab9c6
(feat) provider budget routing improvements ( #6827 )
...
* minor fix for provider budget
* fix raise good error message when budget crossed for provider budget
* fix test provider budgets
* test provider budgets
* feat - emit llm provider spend on prometheus
* test_prometheus_metric_tracking
* doc provider budgets
2024-11-19 21:25:08 -08:00
Ishaan Jaff
891e9001b5
(testing) add router unit testing for send_llm_exception_alert
, router_cooldown_event_callback
, cooldown utils ( #6258 )
...
* add router unit testing for send_llm_exception_alert
* test router_cooldown_event_callback
* test test_router_cooldown_event_callback_no_prometheus
* test_router_cooldown_event_callback_no_deployment
* test_router_cooldown_event_callback_no_deployment
* add testing for test_should_run_cooldown_logic
* test_increment_deployment_successes_for_current_minute_does_not_write_to_redis
* test test_should_cooldown_deployment_allowed_fails_set_on_router
* use helper for _is_allowed_fails_set_on_router
* add complete testing for cooldown utils
* move router unit tests
* move router handle error
* fix test_send_llm_exception_alert_no_logger
2024-10-16 23:19:51 +05:30
Ishaan Jaff
183bd5d873
(testing - litellm.Router ) add unit test coverage for pattern matching / wildcard routing ( #6250 )
...
* add testing coverage for pattern match router
* fix add_pattern
* fix typo on router_cooldown_event_callback
* add testing for pattern match router
* fix add explanation for pattern match router
2024-10-16 11:58:05 +05:30
Ishaan Jaff
224460d4c9
fix prometheus track cooldown events on custom logger ( #6060 )
2024-10-04 16:56:22 +05:30
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
Ishaan Jaff
c8eff2dc65
[Feat-Prometheus] Track exception status on litellm_deployment_failure_responses
( #5706 )
...
* add litellm_deployment_cooled_down
* track num cooldowns on prometheus
* track exception status
* fix linting
* docs prom metrics
* cleanup premium user checks
* prom track deployment failure state
* docs prometheus
2024-09-14 18:44:31 -07:00
Ishaan Jaff
0b9ad45790
refactor prom metrics
2024-08-09 09:02:23 -07:00
Ishaan Jaff
579f09b334
fix logging cool down deployment
2024-08-07 11:27:05 -07:00
Ishaan Jaff
d1e519afd1
use router_cooldown_handler
2024-08-07 10:40:55 -07:00