From 9fe00226962f16705918d80341bcde9b8a63b70b Mon Sep 17 00:00:00 2001 From: tinysolver Date: Sat, 3 Oct 2026 15:13:13 +0900 Subject: [PATCH] fix(openrouter): list image generation in the packaged endpoint matrix The proxy's public endpoint listing reads litellm/provider_endpoints_support_backup.json, where openrouter image_generations was still false while provider_endpoints_support.json now marks it true. Only that value changes, since the two files already differ elsewhere on main --- litellm/provider_endpoints_support_backup.json | 2 +- .../test_openrouter_image_gen_transformation.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/litellm/provider_endpoints_support_backup.json b/litellm/provider_endpoints_support_backup.json index c9635587eeb..328a59ddc93 100644 --- a/litellm/provider_endpoints_support_backup.json +++ b/litellm/provider_endpoints_support_backup.json @@ -1810,7 +1810,7 @@ "messages": true, "responses": true, "embeddings": true, - "image_generations": false, + "image_generations": true, "audio_transcriptions": false, "audio_speech": false, "moderations": false, diff --git a/tests/unit/llms/openrouter/image_generation/test_openrouter_image_gen_transformation.py b/tests/unit/llms/openrouter/image_generation/test_openrouter_image_gen_transformation.py index d2f52e90fc5..f5ec6a15a54 100644 --- a/tests/unit/llms/openrouter/image_generation/test_openrouter_image_gen_transformation.py +++ b/tests/unit/llms/openrouter/image_generation/test_openrouter_image_gen_transformation.py @@ -1,4 +1,5 @@ import json +from pathlib import Path from typing import Final from unittest.mock import MagicMock, patch @@ -534,3 +535,18 @@ def test_openrouter_error_response_surfaces_as_not_found_error(): api_key="sk-test", client=_client(recorder), ) + + +@pytest.mark.parametrize( + "matrix_path", + [ + Path(litellm.__file__).parent.parent / "provider_endpoints_support.json", + Path(litellm.__file__).parent / "provider_endpoints_support_backup.json", + ], + ids=["root", "backup"], +) +def test_endpoint_matrix_lists_openrouter_image_generations(matrix_path: Path): + """The proxy's public endpoint listing reads the backup copy shipped inside the package""" + matrix = json.loads(matrix_path.read_text()) + + assert matrix["providers"]["openrouter"]["endpoints"]["image_generations"] is True