diff --git a/ruff.toml b/ruff.toml index 6c854b7ad03..54261fb189e 100644 --- a/ruff.toml +++ b/ruff.toml @@ -19,3 +19,5 @@ exclude = ["litellm/types/*", "litellm/__init__.py", "litellm/proxy/example_conf "litellm/responses/streaming_iterator.py" = ["PLR0915"] "litellm/files/main.py" = ["PLR0915"] "litellm/llms/litellm_proxy/skills/sandbox_executor.py" = ["PLR0915"] +"litellm/proxy/hooks/proxy_track_cost_callback.py" = ["PLR0915"] +"litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py" = ["PLR0915"] diff --git a/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py b/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py index c2673ddce23..c7c46952c71 100644 --- a/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py +++ b/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_anthropic_passthrough_logging_handler.py @@ -752,6 +752,8 @@ class TestBuildCompleteStreamingResponseRobustness: result = self._build(chunks) assert result is not None assert result.choices[0].message.content == "The stream ends with [DONE]" + + class TestInterruptedStreamOutputTokenRecovery: """ When an Anthropic pass-through stream is interrupted (client disconnect) @@ -893,7 +895,6 @@ class TestInterruptedStreamOutputTokenRecovery: assert usage.completion_tokens == final - class TestStreamFalseDeduplication: """ Regression tests for the duplicate-callback bug where a streaming pass-through