litellm/litellm
michelligabriele 0057452485 fix(proxy): guard streaming deferred init with try/finally, fix test imports
Wrap _run_deferred_stream_guardrails initialization (UnifiedLLMGuardrails
constructor and _check_and_merge_model_level_guardrails) in try/finally
so logging always fires even if init throws. Prevents silent logging loss
on transient errors.

Move fastapi.HTTPException import from module-level to local test-function
scope. Add test_logging_fires_even_if_guardrail_init_raises to verify the
try/finally guard.
2026-03-19 18:00:49 +01:00
..
a2a_protocol style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
anthropic_interface style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
assistants
batch_completion fix: prompt registry 2026-02-18 00:34:54 +05:30
batches Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
caching Reapply "feat: add model_cost aliases expansion support" 2026-03-12 13:36:57 -03:00
completion_extras [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
containers Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
endpoints/speech/speech_to_completion_bridge
evals Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
experimental_mcp_client style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
files style: run black formatter on 52 non-enterprise files 2026-03-12 14:23:50 -03:00
fine_tuning style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
google_genai Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
images Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
integrations [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
interactions Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
litellm_core_utils fix(proxy): defer logging until post-call guardrails complete 2026-03-19 16:49:30 +01:00
llms [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
ocr Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
passthrough style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
proxy fix(proxy): guard streaming deferred init with try/finally, fix test imports 2026-03-19 18:00:49 +01:00
proxy_auth fix: prompt registry 2026-02-18 00:34:54 +05:30
rag style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
realtime_api Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
rerank_api Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
responses [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
router_strategy [Feat] - Ishaan main merge branch (#23596) 2026-03-14 09:40:00 -07:00
router_utils style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
search Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
secret_managers style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
skills Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
types Merge branch 'main' into litellm_yj_march_17_2026 2026-03-18 15:13:41 -07:00
vector_store_files Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
vector_stores Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
videos [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
__init__.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
_lazy_imports.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_lazy_imports_registry.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
_logging.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
_redis.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_service_logger.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_uuid.py
_version.py
anthropic_beta_headers_config.json fix: enable context-1m-2025-08-07 beta header for vertex_ai provider (#21867) 2026-02-21 20:12:23 -08:00
anthropic_beta_headers_manager.py Refactor: Filtering beta header after transformation 2026-03-16 10:47:15 +05:30
blog_posts.json docs(blog): add WebRTC blog post link 2026-03-13 17:54:33 +05:30
budget_manager.py
constants.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
cost.json
cost_calculator.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
exceptions.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
main.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
model_prices_and_context_window_backup.json [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
mypy.ini
policy_templates_backup.json feat(add-new-block_code_execution-guardrail): prevent agent from executing code (#22154) 2026-02-25 22:02:14 -08:00
provider_endpoints_support_backup.json feat(search): add Serper (serper.dev) as search provider (#23112) 2026-03-09 08:40:37 -07:00
py.typed
router.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
scheduler.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
setup_wizard.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
timeout.py
utils.py fix(proxy): defer logging until post-call guardrails complete 2026-03-19 16:49:30 +01:00