mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
* fix(router): stamp the failed deployment on every endpoint's attempt Weighted failover (#27980) re-picks within a model group by excluding the deployment named in the error's failed_deployment_id. #27980 stamped that id in only three attempt functions: _completion, _acompletion and _ageneric_api_call_with_fallbacks_helper. Embedding, image generation, transcription, speech, text completion, rerank, adapter completion, the sync generic call and vector store create never stamped it, so with enable_weighted_failover on, a failure on one of their deployments skipped the in-group re-pick and went straight to the cross-group fallbacks, or raised. Each of those attempts now stamps the deployment it picked, read from the model_info that _update_kwargs_with_deployment put on the request (so a client-side-credential call names its own dynamic deployment, as on completions). A failed pick stamps nothing. File and batch creation and batch cancellation are left alone: they are bound to a resource on the deployment they picked, so re-picking another one cannot help. * test(router): narrow the failed-pick raise to the no-healthy-deployments error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FDwtoMjnHa4xxazGJJNSm * fix(router): exclude the configured deployment on failover for client-side credentials Weighted failover excluded the per-request id that client-supplied credentials generate, so the failed configured deployment stayed eligible for the re-pick. Stamp the configured id alongside it and exclude that. Also drop the vector store create stamp, which no fallback path reads, and redundant test comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FDwtoMjnHa4xxazGJJNSm --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| _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.