From 928c7db7597b9f9e52dcc87e08492ec83218cc4a Mon Sep 17 00:00:00 2001 From: Christopher Pruijsen Date: Fri, 9 Oct 2026 06:12:39 +0100 Subject: [PATCH 1/3] fix(proxy): restore the config.yaml docs page in the OpenAPI schema --- litellm/proxy/proxy_server.py | 1 - .../proxy_server/test_openapi_customization.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index e035f061db9..4033f10e0fe 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -19643,7 +19643,6 @@ async def get_config( "/config/yaml", tags=["config.yaml"], dependencies=[Depends(user_api_key_auth)], - include_in_schema=False, ) async def config_yaml_endpoint(config_info: ConfigYAML): """ diff --git a/tests/unit/proxy/proxy_server/test_openapi_customization.py b/tests/unit/proxy/proxy_server/test_openapi_customization.py index 141b9f2a98a..ae46315a086 100644 --- a/tests/unit/proxy/proxy_server/test_openapi_customization.py +++ b/tests/unit/proxy/proxy_server/test_openapi_customization.py @@ -281,6 +281,23 @@ def test_get_openapi_schema_missing_app_attribute_raises_error(monkeypatch): get_openapi_schema() +def test_get_openapi_schema_documents_config_yaml(monkeypatch): + """The /config/yaml mock endpoint must stay in the spec so Swagger renders + its config.yaml tag section and the ConfigYAML component schema.""" + import litellm.proxy.proxy_server as ps + + monkeypatch.setattr(ps.app, "openapi_schema", None, raising=True) + schema = get_openapi_schema() + observed = { + "component_present": "ConfigYAML" in schema["components"]["schemas"], + "tags": schema["paths"]["/config/yaml"]["get"]["tags"], + } + assert normalize(observed) == { + "component_present": True, + "tags": ["config.yaml"], + } + + # --------------------------------------------------------------------------- # custom_openapi # --------------------------------------------------------------------------- From dfa920cb627f444669516ea73199712c679b69f6 Mon Sep 17 00:00:00 2001 From: Christopher Pruijsen Date: Fri, 9 Oct 2026 15:03:17 +0100 Subject: [PATCH 2/3] chore(terraform): allowlist GET /config/yaml in the provider coverage audit The endpoint is a docs-only mock that renders the config.yaml reference page in Swagger, not a manageable resource. --- terraform/provider/tools/endpointaudit/coverage_allowlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/provider/tools/endpointaudit/coverage_allowlist.txt b/terraform/provider/tools/endpointaudit/coverage_allowlist.txt index 9305d2e109d..f4093b21178 100644 --- a/terraform/provider/tools/endpointaudit/coverage_allowlist.txt +++ b/terraform/provider/tools/endpointaudit/coverage_allowlist.txt @@ -78,6 +78,7 @@ GET /team/available GET /team/metadata_schema GET /team/{team_id}/members/me GET /user/available_users +GET /config/yaml # docs-only mock; renders the config.yaml reference page in Swagger # Imperative one-shot operations: bulk edits, rotation, health probes, test hooks, # migrations, and approval workflows; procedural, not declarative state From 8b247158f3447650cc05c0afc721c7d08bc7111b Mon Sep 17 00:00:00 2001 From: Christopher Pruijsen Date: Tue, 3 Nov 2026 00:23:59 +0000 Subject: [PATCH 3/3] test(proxy): type the config.yaml schema regression test --- .../unit/proxy/proxy_server/test_openapi_customization.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/unit/proxy/proxy_server/test_openapi_customization.py b/tests/unit/proxy/proxy_server/test_openapi_customization.py index 202b84be541..a8bfd24f8c2 100644 --- a/tests/unit/proxy/proxy_server/test_openapi_customization.py +++ b/tests/unit/proxy/proxy_server/test_openapi_customization.py @@ -291,14 +291,12 @@ def test_get_openapi_schema_missing_app_attribute_raises_error(monkeypatch): get_openapi_schema() -def test_get_openapi_schema_documents_config_yaml(monkeypatch): - """The /config/yaml mock endpoint must stay in the spec so Swagger renders - its config.yaml tag section and the ConfigYAML component schema.""" +def test_get_openapi_schema_documents_config_yaml(monkeypatch: pytest.MonkeyPatch): import litellm.proxy.proxy_server as ps monkeypatch.setattr(ps.app, "openapi_schema", None, raising=True) - schema = get_openapi_schema() - observed = { + schema: Final = get_openapi_schema() + observed: Final = { "component_present": "ConfigYAML" in schema["components"]["schemas"], "tags": schema["paths"]["/config/yaml"]["get"]["tags"], }