litellm/tests/test_litellm/proxy
yuneng-jiang 8ca744036a [Fix] Malformed messages returning 500 instead of 400
The existing AttributeError detection in proxy error handling only
checked one level deep in the exception chain (__cause__, __context__,
original_exception). In practice, the AttributeError from malformed
messages gets wrapped in multiple layers (AttributeError ->
OpenAIException -> APIConnectionError), so the check never found it.

Extracted the check into _has_attribute_error_in_chain() which walks
the full exception chain recursively (depth-capped at 10 to prevent
infinite loops from circular references).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 23:01:25 -07:00
..
_experimental/mcp_server fix(ci): skip tests requiring openai>=2.x and MCP M2M oauth2_flow 2026-03-13 01:09:56 +00:00
agent_endpoints fix(tests): restore litellm_params=None on mock agent in a2a invoke test (#23125) 2026-03-09 07:16:02 -07:00
anthropic_endpoints
auth merge: resolve conflicts with upstream staging (bedrock + mcp tests) 2026-03-12 13:40:16 -03:00
client
common_utils Merge pull request #20688 from BerriAI/litellm_budget_tier_enforcement_for_keys 2026-03-06 20:44:58 -08:00
db Revert "feat(proxy): add Prisma DB pool and engine health metrics to Promethe…" 2026-03-09 14:55:11 -07:00
discovery_endpoints Support auto_redirect_ui_login_to_sso in config.yaml general_settings 2026-03-11 11:34:17 -07:00
experimental/mcp_server
google_endpoints
guardrails merge: resolve conflicts between main and litellm_oss_staging_03_11_2026 2026-03-12 09:38:31 -03:00
health_endpoints
hooks fix(proxy): make async_post_call_response_headers_hook consistent across all endpoints (#22985) 2026-03-12 08:51:00 -07:00
image_endpoints
management_endpoints fix: stabilize 5 CI test failures 2026-03-13 01:03:35 +00:00
management_helpers [Docs] Fix "Page Not Found" link for Anthropic endpoint (#23349) 2026-03-11 20:17:41 +05:30
middleware
openai_files_endpoint CircleCI test stability (#23055) 2026-03-07 15:19:39 -08:00
pass_through_endpoints fix: stabilize 5 CI test failures 2026-03-13 01:03:35 +00:00
policy_engine
prompts
public_endpoints
rag_endpoints
realtime_endpoints address greptile review feedback (greploop iteration 2) 2026-03-12 18:53:22 +05:30
response_api_endpoints
spend_tracking merge: resolve conflicts with upstream staging (bedrock + mcp tests) 2026-03-12 13:40:16 -03:00
test_configs
ui_crud_endpoints
vector_store_endpoints
__init__.py
conftest.py
test_aiohttp_cleanup_closed.py
test_api_key_masking_in_errors.py
test_audio_speech_prometheus_hooks.py
test_batch_expiry.py
test_batch_metadata_none_fix.py
test_caching_routes.py
test_chat_completion_metadata.py
test_common_request_processing.py [Fix] Malformed messages returning 500 instead of 400 2026-03-12 23:01:25 -07:00
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_health_check_max_tokens.py
test_litellm_pre_call_utils.py
test_model_dump_with_preserved_fields.py
test_model_id_header_propagation.py
test_openapi_schema_validation.py Reapply "feat: add model_cost aliases expansion support" 2026-03-12 13:36:57 -03:00
test_prometheus_cleanup.py
test_proxy_cli.py merge: resolve conflicts between main and litellm_oss_staging_03_11_2026 2026-03-12 09:38:31 -03:00
test_proxy_server.py
test_proxy_types.py
test_proxy_utils.py [Feat[ extends OAuth2 M2M authentication support to info routes (/key/info, /team/info, /user/info, /model/info) (#22713) 2026-03-06 17:29:25 -08:00
test_pyroscope.py
test_response_model_sanitization.py feat(azure_ai): show actual model used in Azure Model Router response 2026-03-12 11:41:19 +05:30
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
test_tools_allowlist_enforcement.py
test_update_llm_router_resilience.py