diff --git a/litellm/proxy/route_llm_request.py b/litellm/proxy/route_llm_request.py index c90da10f03e..5c96c75d2c8 100644 --- a/litellm/proxy/route_llm_request.py +++ b/litellm/proxy/route_llm_request.py @@ -77,7 +77,7 @@ ROUTE_ENDPOINT_MAPPING: Final = { "acompletion": "/chat/completions", "atext_completion": "/completions", "aembedding": "/embeddings", - "aimage_generation": "/image/generations", + "aimage_generation": "/images/generations", "aspeech": "/audio/speech", "atranscription": "/audio/transcriptions", "amoderation": "/moderations", diff --git a/tests/test_litellm/proxy/image_endpoints/test_endpoints.py b/tests/test_litellm/proxy/image_endpoints/test_endpoints.py index c806b06c019..f3a1fab9a31 100644 --- a/tests/test_litellm/proxy/image_endpoints/test_endpoints.py +++ b/tests/test_litellm/proxy/image_endpoints/test_endpoints.py @@ -129,14 +129,14 @@ async def test_image_generation__missing_required_param_is_400(monkeypatch): async def fake_add_litellm_data_to_request(**kwargs): return kwargs["data"] - async def fake_pre_call_hook(*, user_api_key_dict, data, call_type): # type: ignore[override] + async def fake_pre_call_hook(*, user_api_key_dict, data, call_type): return data async def fake_post_call_failure_hook(**_: Any) -> None: return None - async def fake_route_request(*, data, **kwargs): # type: ignore[override] - raise ProxyMissingRequiredParamError(route="/image/generations", param="prompt") + async def fake_route_request(*, data, **kwargs): + raise ProxyMissingRequiredParamError(route="/images/generations", param="prompt") fake_proxy_logger = SimpleNamespace( pre_call_hook=fake_pre_call_hook, diff --git a/tests/test_litellm/proxy/test_route_llm_request.py b/tests/test_litellm/proxy/test_route_llm_request.py index 343cc6ebc60..31b835107be 100644 --- a/tests/test_litellm/proxy/test_route_llm_request.py +++ b/tests/test_litellm/proxy/test_route_llm_request.py @@ -1048,7 +1048,7 @@ async def test_route_request_override_enable_tag_filtering_beats_body_value(): ("acreate_batch", "input_file_id", "/batches"), ("aspeech", "input", "/audio/speech"), ("amoderation", "input", "/moderations"), - ("aimage_generation", "prompt", "/image/generations"), + ("aimage_generation", "prompt", "/images/generations"), ], ) @pytest.mark.parametrize(