litellm/tests/test_litellm/responses
Cesar Garcia b1968a8e33
fix(responses): update local_vars with detected provider (#19782) (#19798)
When using the responses API with provider-specific params (aws_*, vertex_*)
without explicitly passing custom_llm_provider, the code crashed with:
AttributeError: 'NoneType' object has no attribute 'startswith'

Root cause: local_vars was captured via locals() before get_llm_provider()
detected the provider from the model string (e.g., "bedrock/..."), so
custom_llm_provider remained None when processing provider-specific params.

Fix: Update local_vars["custom_llm_provider"] after get_llm_provider() call
so the detected provider is available for param processing.

Affected provider-specific params:
- aws_* (aws_region_name, aws_access_key_id, etc.) for Bedrock/SageMaker
- vertex_* (vertex_project, vertex_location, etc.) for Vertex AI
2026-01-26 20:47:35 -08:00
..
litellm_completion_transformation Fix: tool call streaming in chat completino brigde 2026-01-21 12:14:02 +05:30
mcp fix: include tool arguments in proxy_server_request for spend logs callbacks 2026-01-23 16:36:37 +09:00
test_no_duplicate_spend_logs.py test_async_no_duplicate_spend_logs 2025-12-06 16:14:56 -08:00
test_null_test_fix.py Fix: Responses content can't be none 2026-01-14 12:13:18 +05:30
test_responses_utils.py fix(responses): update local_vars with detected provider (#19782) (#19798) 2026-01-26 20:47:35 -08:00
test_text_format_conversion.py Fix: test_text_format_to_text_conversion - properly mock handler to avoid API calls 2026-01-08 16:37:12 +05:30