mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
* fix(a2a): use text/event-stream SSE format for message/stream endpoint The A2A gateway's streaming response was using application/x-ndjson Content-Type and raw NDJSON body format. The A2A protocol spec requires text/event-stream with SSE framing (data: ...\n\n). The official a2a-sdk client validates the Content-Type header and raises SSEError when it doesn't contain text/event-stream. Changes: - Changed media_type from application/x-ndjson to text/event-stream - Updated response body to use SSE framing (data: prefix + \n\n suffix) - Added tests validating Content-Type and SSE body format Fixes #20278 * Potential fix for code scanning alert no. 4045: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * test(a2a): add manual SSE format validation script Adds a manual test script that: 1. Starts a real A2A agent on port 10001 2. Starts LiteLLM proxy with the agent registered 3. Makes a streaming request to the proxy's A2A gateway 4. Validates Content-Type header is text/event-stream 5. Validates body uses SSE framing (data: ...\n\n) Run: python tests/a2a_manual/test_a2a_sse_manual.py --------- Co-authored-by: shin-bot-litellm <shin-bot-litellm@users.noreply.github.com> Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| _experimental/mcp_server | ||
| agent_endpoints | ||
| anthropic_endpoints | ||
| auth | ||
| client | ||
| common_utils | ||
| db | ||
| discovery_endpoints | ||
| experimental/mcp_server | ||
| google_endpoints | ||
| guardrails | ||
| health_endpoints | ||
| hooks | ||
| image_endpoints | ||
| management_endpoints | ||
| management_helpers | ||
| middleware | ||
| openai_files_endpoint | ||
| pass_through_endpoints | ||
| policy_engine | ||
| prompts | ||
| public_endpoints | ||
| response_api_endpoints | ||
| spend_tracking | ||
| test_configs | ||
| ui_crud_endpoints | ||
| vector_store_endpoints | ||
| __init__.py | ||
| conftest.py | ||
| test_batch_metadata_none_fix.py | ||
| test_caching_routes.py | ||
| test_chat_completion_metadata.py | ||
| test_common_request_processing.py | ||
| test_custom_proxy.py | ||
| test_empty_model_list.py | ||
| test_enforce_user_param.py | ||
| test_fallback_management_endpoints.py | ||
| test_fastapi_offline_routes.py | ||
| test_health_check_functions.py | ||
| test_litellm_pre_call_utils.py | ||
| test_model_id_header_propagation.py | ||
| test_proxy_cli.py | ||
| test_proxy_server.py | ||
| test_proxy_types.py | ||
| test_proxy_utils.py | ||
| test_response_model_sanitization.py | ||
| test_route_a2a_models.py | ||
| test_route_llm_request.py | ||
| test_shared_health_check.py | ||
| test_spend_log_cleanup.py | ||
| test_swagger_chat_completions.py | ||
| test_team_member_update.py | ||