Avatar for the BerriAI user
BerriAI
litellm
BlogDocsChangelog

fix(proxy): defer logging until post-call guardrails complete

#24135Merged
Comparing
michelligabriele:fix/deferred-guardrail-logging-v2
(
573f6b7
) with
litellm_oss_staging_03_19_2026
(
81dadb6
)
CodSpeed Performance Gauge
0%
Untouched
16

Benchmarks

16 total
test_get_model_info_anthropic
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
-1%
83.7 µs84.7 µs
test_get_model_info_openai
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
+1%
88.8 µs88.1 µs
test_get_llm_provider_anthropic
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
+1%
147.4 µs146.4 µs
test_token_counter_simple_message
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
+1%
240.7 µs239.5 µs
test_get_model_cost_key_case_insensitive
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
87.5 µs87.9 µs
test_get_llm_provider_openai
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
143.7 µs143 µs
test_token_counter_long_content
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.7 ms1.7 ms
test_get_model_info_with_provider
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
85.4 µs85.7 µs
test_token_counter_multi_turn
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
568.7 µs570 µs
test_cost_per_token_openai
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
540.4 µs541.1 µs
test_token_counter_raw_text
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
187.5 µs187.3 µs
test_get_model_cost_key_exact_match
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
85.3 µs85.4 µs
test_get_llm_provider_with_prefix
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
142 µs141.8 µs
test_cost_per_token_anthropic
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
543.7 µs543.1 µs
test_token_counter_with_tools
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
417 µs417.5 µs
test_get_llm_provider_azure
tests/benchmarks/test_benchmarks.py
CodSpeed Performance Gauge
0%
149.2 µs149 µs

Commits

Click on a commit to change the comparison range
Base
main
81dadb6
+0.52%
fix(proxy): defer logging until post-call guardrails complete
001501f
6 months ago
by michelligabriele
+0.03%
fix(proxy): pass guardrail_data to hooks in streaming deferred path
4b8c532
6 months ago
by michelligabriele
+0.15%
fix(proxy): guard streaming deferred init with try/finally, fix test imports
0057452
6 months ago
by michelligabriele
-0.75%
refactor(proxy): reuse unified_guardrail singleton, rename shadowing variable
b34231d
6 months ago
by michelligabriele
-0.08%
fix(proxy): guard lazy imports inside try, clean up orphaned streaming closure
97e17fa
5 months ago
by michelligabriele
+0.09%
fix(proxy): replace sys.exc_info with boolean sentinel for orphan detection
ee17ef3
5 months ago
by michelligabriele
+0.09%
fix(proxy): split orphan cleanup into separate try blocks for resilience
573f6b7
5 months ago
by michelligabriele
© 2026 CodSpeed Technology
Home Terms Privacy Docs