mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* refactor(rust): log from the core crates with tracing instead of host calls router-core asked its host to write two model info log lines through an awaited lookup, and the model capacity engine asked its host for every warning and error line plus a fixed "unlicensed priority" line. A log line is not something only the host can answer, so both crates now emit these lines with tracing and the three host surfaces are gone from the traits, from the native and Python hosts and from the Python answering code. The Python proxy still gets the same lines at the same level on the same logger. The bridge already delivers tracing events to Python logging, so its target table now sends the capacity crate to "LiteLLM Proxy" and router-core's model info module to "LiteLLM Router", and a model info query runs under the calling request's logger so a level change is seen at once. A line logged on a runtime task is queued and handed to Python from the blocking pool, so it can land after the call that logged it returns. The bridge gains native_log_lines_delivered(), an awaitable that resolves once the queued lines are delivered, and the capacity tests await it before reading each step's lines. * refactor(rust): name the log delivery wait rust_log_lines_delivered The Rust workspace says "Rust", not "Native", for something written in Rust. * fix(proxy): deliver queued Rust log lines before the proxy shuts down A log line a Rust runtime task queued could be lost when the proxy stopped before the queue was drained. Shutdown now waits for the queue, after the steps that can still log. The queue also reported its dropped-line count only when a later batch arrived, so a drop during the last batch was never reported. It is now reported once the queue is empty, and a delivery wait ends only after that report. * fix(proxy): bound the shutdown wait for queued Rust log lines The wait had no timeout, so a log handler that stalled would hold worker shutdown until an outside kill. It now gives up after five seconds or when the graceful shutdown window runs out, whichever comes first. A timeout is not logged, because a stalled handler holds its lock and the warning would block on it too. |
||
|---|---|---|
| .. | ||
| litellm_skills | ||
| model_capacity_golden | ||
| __init__.py | ||
| native_capacity_handler.py | ||
| parallel_request_limiter_v3_golden.json | ||
| test_async_post_call_streaming_iterator_hook.py | ||
| test_autorouter_baseline_cache.py | ||
| test_banned_keyword_list.py | ||
| test_batch_enqueued_tokens.py | ||
| test_batch_enqueued_tokens_rust.py | ||
| test_batch_file_validation.py | ||
| test_batch_rate_limiter.py | ||
| test_dynamic_rate_limiter.py | ||
| test_dynamic_rate_limiter_v3_on_native_limiter_rust.py | ||
| test_dynamic_rate_limiter_v3_rust.py | ||
| test_image_generation_guardrails.py | ||
| test_key_management_event_hooks.py | ||
| test_max_budget_per_session_limiter.py | ||
| test_max_iterations_limiter.py | ||
| test_message_thread_ownership.py | ||
| test_model_budget_shared_windows.py | ||
| test_model_capacity_native.golden.json | ||
| test_model_capacity_native.py | ||
| test_model_max_budget_limiter.py | ||
| test_parallel_request_limiter.py | ||
| test_parallel_request_limiter_v3.py | ||
| test_parallel_request_limiter_v3_native.py | ||
| test_parallel_request_limiter_v3_rust.py | ||
| test_post_call_failure_hook_integration.py | ||
| test_post_call_response_headers_hook.py | ||
| test_post_call_streaming_hook_integration.py | ||
| test_post_call_success_hook_integration.py | ||
| test_priority_class_share.py | ||
| test_prompt_cache_observer.py | ||
| test_prompt_injection_detection.py | ||
| test_proxy_hooks_init.py | ||
| test_proxy_rate_limit_provider_field.py | ||
| test_proxy_rate_limit_provider_field_capacity_rust.py | ||
| test_proxy_rate_limit_provider_field_rust.py | ||
| test_proxy_track_cost_callback.py | ||
| test_proxy_track_cost_callback_ledger.py | ||
| test_proxy_track_cost_callback_rust.py | ||
| test_rate_limiter_toctou_capacity_rust.py | ||
| test_rate_limiter_toctou_rust.py | ||
| test_search_free_tier.py | ||
| test_send_invite_email.py | ||
| test_sensitive_data_routing.py | ||
| test_tpm_concurrent.py | ||
| test_tpm_concurrent_rust.py | ||
| test_unit_test_max_model_budget_limiter.py | ||
| test_user_management_event_hooks.py | ||