From ded0004d3133a3bd42459ff25daebd589c3e036c Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 3 Nov 2026 13:52:33 -0800 Subject: [PATCH] test(translation): pin the provider 400 when Anthropic-only params are not dropped --- litellm/main.py | 6 +++--- .../params/test_messages_params_anthropic_only.py | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index a3ab56ca0d4..6c3992e6bbd 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -1318,9 +1318,6 @@ def mock_completion( raise Exception(f"Mock completion response failed - {e}") -from litellm.responses.bridge_check import ( # noqa: E402 # re-export at the old definition site - _resolve_openai_api_base as _resolve_openai_api_base, # pyright: ignore[reportPrivateUsage] # noqa: PLC0414 # re-export of moved helper -) from litellm.responses.bridge_check import ( RESPONSES_WEB_SEARCH_PROVIDERS, bridge_check_request_params, @@ -1328,6 +1325,9 @@ from litellm.responses.bridge_check import ( keep_registered_mode, str_keyed_mapping, ) +from litellm.responses.bridge_check import ( # noqa: E402 # re-export at the old definition site + _resolve_openai_api_base as _resolve_openai_api_base, # pyright: ignore[reportPrivateUsage] # noqa: PLC0414 # re-export of moved helper +) from litellm.responses.bridge_check import ( # noqa: E402 # re-export at the old definition site responses_api_bridge_check as responses_api_bridge_check, # pyright: ignore[reportUnknownVariableType] # noqa: PLC0414 # re-export of moved function ) diff --git a/tests/integration/translation/messages/params/test_messages_params_anthropic_only.py b/tests/integration/translation/messages/params/test_messages_params_anthropic_only.py index 7e1caf8eaca..7489857f1f5 100644 --- a/tests/integration/translation/messages/params/test_messages_params_anthropic_only.py +++ b/tests/integration/translation/messages/params/test_messages_params_anthropic_only.py @@ -33,7 +33,17 @@ GPT_5_4_ANTHROPIC_ONLY_PARAMS_REFUSED_TEST_CASE: Final = replace( mock_provider_status_code=400, mock_provider_response=AZURE_UNRECOGNIZED_ARGUMENT, expected_litellm_status_code=400, - expected_litellm_response={}, + expected_litellm_response={ + "type": "error", + "error": { + "type": "invalid_request_error", + "message": ( + "litellm.BadRequestError: AzureException BadRequestError - " + "Unrecognized request argument supplied: inference_geo\n\n" + "LiteLLM: model group 'azure/gpt-5.4' failed with the error above. No fallback was attempted." + ), + }, + }, ) CASES: Final = (