litellm/tests/test_litellm/proxy
michelligabriele 558f01e848
fix(proxy): use return value from CustomLogger.async_post_call_success_hook (#19670)
* fix(proxy): use return value from CustomLogger.async_post_call_success_hook

Previously the return value was ignored for CustomLogger callbacks,
preventing users from modifying responses. Now the return value is
captured and used to replace the response (if not None), consistent
with CustomGuardrail and streaming iterator hook behavior.

Fixes issue with custom_callbacks not being able to inject data into
LLM responses.

* fix(proxy): also fix async_post_call_streaming_hook to use return value

Previously the streaming hook only used return values that started with
"data: " (SSE format). Now any non-None return value is used, consistent
with async_post_call_success_hook and streaming iterator hook behavior.

Added tests for streaming hook transformation.

---------

Co-authored-by: Gabriele Michelli <michelligabriele0@gmail.com>
2026-01-26 08:48:22 -08:00
..
_experimental/mcp_server fix(mcp): forward static_headers to MCP servers (#19341) (#19366) 2026-01-21 19:30:55 -08:00
agent_endpoints chore: resolve ModuleNotFoundError for Microsoft Foundry Agents (#18991) 2026-01-17 04:56:52 +05:30
anthropic_endpoints
auth attempt test_route_checks fix 2026-01-20 15:55:44 -08:00
client
common_utils fix: ensure auto-rotation updates existing AWS secret instead of creating new one (#19455) 2026-01-20 18:30:36 -08:00
db fix: proactive RDS IAM token refresh to prevent 15-min connection failed (#18795) 2026-01-08 23:53:36 +05:30
discovery_endpoints
experimental/mcp_server
google_endpoints fix(utils.py): correctly extract messages from google genai contents (#19156) 2026-01-19 06:00:23 -08:00
guardrails fix(presidio): resolve runtime error by handling asyncio loops in bac… (#19714) 2026-01-24 15:36:49 -08:00
health_endpoints
hooks fix(proxy): use return value from CustomLogger.async_post_call_success_hook (#19670) 2026-01-26 08:48:22 -08:00
image_endpoints
management_endpoints Merge pull request #19604 from BerriAI/litellm_team_update_org 2026-01-24 09:09:55 -08:00
management_helpers
middleware
openai_files_endpoint Add managed files support when load_balancing is True 2026-01-19 15:54:04 +05:30
pass_through_endpoints Merge pull request #19638 from BerriAI/main 2026-01-23 14:54:17 +05:30
policy_engine [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
prompts fix(prompts): fix prompt info lookup and delete using correct IDs (#19358) 2026-01-20 12:28:34 -08:00
public_endpoints /public/model_hub health information 2026-01-16 15:36:56 -08:00
response_api_endpoints
spend_tracking Fix all 130126 tests 2026-01-14 17:47:03 +05:30
test_configs
ui_crud_endpoints
vector_store_endpoints Fix: vector store sync issues 2026-01-19 13:17:08 +05:30
__init__.py
conftest.py
test_batch_metadata_none_fix.py
test_caching_routes.py
test_common_request_processing.py Merge pull request #18763 from BerriAI/litellm_staging_01_07_2026 2026-01-09 17:01:58 +05:30
test_custom_proxy.py
test_empty_model_list.py Fixing tests and linting 2026-01-21 11:02:39 -08:00
test_enforce_user_param.py
test_fallback_management_endpoints.py Add fallback endpoints support 2026-01-16 10:51:33 +05:30
test_fastapi_offline_routes.py
test_health_check_functions.py
test_litellm_pre_call_utils.py [Feat] UI + Backend - Allow adding policies on Keys/Teams + Viewing on Info panels (#19688) 2026-01-23 19:03:44 -08:00
test_model_id_header_propagation.py
test_proxy_cli.py test_get_default_unvicorn_init_args 2026-01-24 12:59:51 -08:00
test_proxy_server.py Model and Team filtering 2026-01-24 14:45:14 -08:00
test_proxy_types.py
test_proxy_utils.py Fix date overflow/division by zero in proxy utils (#19527) 2026-01-21 21:09:57 -08:00
test_route_llm_request.py fix: args issue & refactor into helper function to reduce bloat for both(#19441) 2026-01-25 10:21:20 +05:30
test_shared_health_check.py
test_spend_log_cleanup.py feat(proxy): cleanup spend logs cron verification, fix, and docs (#19085) 2026-01-14 22:14:48 +05:30
test_swagger_chat_completions.py Fix Swagger UI path with server_root_path in OpenAPI schema (#18947) 2026-01-14 03:48:43 +05:30
test_team_member_update.py