mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
The cooldown callback labelled the deployment state with the router group name and the config api_base, while requests label it with the resolved model name and the request api_base. A cooldown therefore wrote 2 to a second series that nothing ever reset, so it stayed at 2 after the provider recovered and alerts on it kept firing A new DeploymentStateSeriesTracker remembers the series each deployment wrote since its last success. A cooldown marks those series at 2, falling back to the series derived from config when there is no history. Failures logged while the deployment cools down stay at 2, and the next success clears every marked series back to 0. The cooldown callback now labels its state with the resolved model name and provider, and litellm_deployment_cooled_down keeps its labels The tracker holds at most 10000 deployments and 8 series per deployment, and it writes 0 to any marked series it stops tracking so none is left at 2. It takes its lock as an argument so the concurrency test can watch for contention instead of timing it. set_litellm_deployment_state keeps its five argument signature and the gauge states are a DeploymentState enum The tests check the final gauge state per series in the tracker, the logger setters against the real registry, and the cooldown callback against a real Router. The registry isolation and deployment state readers live in the unit conftest |
||
|---|---|---|
| .. | ||
| _support | ||
| audio_tests | ||
| base_sdk_tests | ||
| benchmarks | ||
| code_coverage_tests | ||
| documentation_tests | ||
| e2e | ||
| e2e_harness | ||
| fixtures | ||
| harness_e2e | ||
| integration | ||
| rust-python-harness | ||
| test_litellm_rust | ||
| typing | ||
| unit | ||
| windows_tests | ||
| __init__.py | ||
| _fake_openai_endpoint_server.py | ||
| _flush_vcr_cache.py | ||
| _live_test_helpers.py | ||
| _master_key.py | ||
| _openai_record_replay_proxy.py | ||
| _process_helpers.py | ||
| _vcr_conftest_common.py | ||
| _vcr_redis_persister.py | ||
| _wait_helpers.py | ||
| _ws_vcr.py | ||
| AGENTS.md | ||
| capturing_transport.py | ||
| eval_swe_bench.py | ||
| fake_openai_endpoint.py | ||
| gettysburg.wav | ||
| large_text.py | ||
| openai_batch_completions.jsonl | ||
| pyrightconfig.json | ||
| README.MD | ||
| test_logging.conf | ||
| test_rust_python_harness.py | ||
| VCR_TESTING.md | ||
| white_100x100.png | ||
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/unit
This folder can only run mock tests.