From 480294ea23f9f0c5e93dab7cf780341e8d0d6b81 Mon Sep 17 00:00:00 2001 From: Som0111 Date: Thu, 10 Sep 2026 11:44:04 +0530 Subject: [PATCH 1/5] fix(proxy): populate created_by/updated_at on model_info regardless of license (#40548) --- fix-40548_v1.0_2026-09-10.patch | 71 +++++++++++++++++++ litellm/proxy/proxy_server.py | 17 +++-- .../proxy/proxy_server/test_proxy_config.py | 32 +++++++++ 3 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 fix-40548_v1.0_2026-09-10.patch diff --git a/fix-40548_v1.0_2026-09-10.patch b/fix-40548_v1.0_2026-09-10.patch new file mode 100644 index 00000000000..a7d5a82011b --- /dev/null +++ b/fix-40548_v1.0_2026-09-10.patch @@ -0,0 +1,71 @@ +diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py +index 9269fd4..365f5c8 100644 +--- a/litellm/proxy/proxy_server.py ++++ b/litellm/proxy/proxy_server.py +@@ -6244,12 +6244,17 @@ class ProxyConfig: + model.model_info["db_model"] = True + model.model_info["blocked"] = bool(getattr(model, "blocked", False)) + +- if premium_user is True: +- # seeing "created_at", "updated_at", "created_by", "updated_by" is a LiteLLM Enterprise Feature +- model.model_info["created_at"] = getattr(model, "created_at", None) +- model.model_info["updated_at"] = getattr(model, "updated_at", None) +- model.model_info["created_by"] = getattr(model, "created_by", None) +- model.model_info["updated_by"] = getattr(model, "updated_by", None) ++ # NOTE: previously gated behind `premium_user`, which meant that on ++ # any proxy instance without an Enterprise license these fields were ++ # never populated -- the Model Management > All Models UI always ++ # rendered "Unknown" / "Unknown date" for every DB-backed model, ++ # regardless of who created it. This metadata already lives on the ++ # DB row itself (it isn't derived/enterprise-only), so always copy ++ # it over. See https://github.com/BerriAI/litellm/issues/40548 ++ model.model_info["created_at"] = getattr(model, "created_at", None) ++ model.model_info["updated_at"] = getattr(model, "updated_at", None) ++ model.model_info["created_by"] = getattr(model, "created_by", None) ++ model.model_info["updated_by"] = getattr(model, "updated_by", None) + + if model.model_info is not None and isinstance(model.model_info, dict): + if "id" not in model.model_info: +diff --git a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py +index e79448d..4fa4b10 100644 +--- a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py ++++ b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py +@@ -2202,6 +2202,38 @@ def test_ProxyConfig_get_model_info_with_id_missing_model_id_raises(monkeypatch) + pc.get_model_info_with_id(model=bad) + + ++@pytest.mark.parametrize("premium_user", [True, False]) ++def test_ProxyConfig_get_model_info_with_id_populates_audit_fields_regardless_of_license( ++ monkeypatch, premium_user ++): ++ """Regression test for https://github.com/BerriAI/litellm/issues/40548 ++ ++ `created_at` / `updated_at` / `created_by` / `updated_by` come straight ++ off the DB row and must be surfaced on `model_info` whether or not the ++ instance has an Enterprise license. Previously they were only copied ++ over `if premium_user is True`, so on non-premium proxies the Model ++ Management > All Models table always showed "Unknown" / "Unknown date" ++ for every model. ++ """ ++ monkeypatch.setattr("litellm.proxy.proxy_server.premium_user", premium_user) ++ pc = ProxyConfig() ++ model = SimpleNamespace( ++ model_id="m-1", ++ model_info={"id": "m-1"}, ++ blocked=False, ++ created_at="2026-01-01T00:00:00Z", ++ updated_at="2026-01-02T00:00:00Z", ++ created_by="malay@example.com", ++ updated_by="malay@example.com", ++ ) ++ out = pc.get_model_info_with_id(model=model, db_model=True) ++ dumped = out.model_dump() ++ assert dumped.get("created_at") == "2026-01-01T00:00:00Z" ++ assert dumped.get("updated_at") == "2026-01-02T00:00:00Z" ++ assert dumped.get("created_by") == "malay@example.com" ++ assert dumped.get("updated_by") == "malay@example.com" ++ ++ + # --------------------------------------------------------------------------- + # ProxyConfig._delete_deployment + # --------------------------------------------------------------------------- diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 30ff47ac9f9..e6262cece55 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -6241,12 +6241,17 @@ class ProxyConfig: model.model_info["db_model"] = True model.model_info["blocked"] = bool(getattr(model, "blocked", False)) - if premium_user is True: - # seeing "created_at", "updated_at", "created_by", "updated_by" is a LiteLLM Enterprise Feature - model.model_info["created_at"] = getattr(model, "created_at", None) - model.model_info["updated_at"] = getattr(model, "updated_at", None) - model.model_info["created_by"] = getattr(model, "created_by", None) - model.model_info["updated_by"] = getattr(model, "updated_by", None) + # NOTE: previously gated behind `premium_user`, which meant that on + # any proxy instance without an Enterprise license these fields were + # never populated -- the Model Management > All Models UI always + # rendered "Unknown" / "Unknown date" for every DB-backed model, + # regardless of who created it. This metadata already lives on the + # DB row itself (it isn't derived/enterprise-only), so always copy + # it over. See https://github.com/BerriAI/litellm/issues/40548 + model.model_info["created_at"] = getattr(model, "created_at", None) + model.model_info["updated_at"] = getattr(model, "updated_at", None) + model.model_info["created_by"] = getattr(model, "created_by", None) + model.model_info["updated_by"] = getattr(model, "updated_by", None) if model.model_info is not None and isinstance(model.model_info, dict): if "id" not in model.model_info: diff --git a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py index e79448d0620..4fa4b10cecf 100644 --- a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py +++ b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py @@ -2202,6 +2202,38 @@ def test_ProxyConfig_get_model_info_with_id_missing_model_id_raises(monkeypatch) pc.get_model_info_with_id(model=bad) +@pytest.mark.parametrize("premium_user", [True, False]) +def test_ProxyConfig_get_model_info_with_id_populates_audit_fields_regardless_of_license( + monkeypatch, premium_user +): + """Regression test for https://github.com/BerriAI/litellm/issues/40548 + + `created_at` / `updated_at` / `created_by` / `updated_by` come straight + off the DB row and must be surfaced on `model_info` whether or not the + instance has an Enterprise license. Previously they were only copied + over `if premium_user is True`, so on non-premium proxies the Model + Management > All Models table always showed "Unknown" / "Unknown date" + for every model. + """ + monkeypatch.setattr("litellm.proxy.proxy_server.premium_user", premium_user) + pc = ProxyConfig() + model = SimpleNamespace( + model_id="m-1", + model_info={"id": "m-1"}, + blocked=False, + created_at="2026-01-01T00:00:00Z", + updated_at="2026-01-02T00:00:00Z", + created_by="malay@example.com", + updated_by="malay@example.com", + ) + out = pc.get_model_info_with_id(model=model, db_model=True) + dumped = out.model_dump() + assert dumped.get("created_at") == "2026-01-01T00:00:00Z" + assert dumped.get("updated_at") == "2026-01-02T00:00:00Z" + assert dumped.get("created_by") == "malay@example.com" + assert dumped.get("updated_by") == "malay@example.com" + + # --------------------------------------------------------------------------- # ProxyConfig._delete_deployment # --------------------------------------------------------------------------- From 2f7652e57c21ee58802180e9d757c2c63c5a644a Mon Sep 17 00:00:00 2001 From: Som0111 Date: Thu, 10 Sep 2026 12:09:07 +0530 Subject: [PATCH 2/5] fix(proxy): redact created_by/updated_by for non-admin callers, trim comments --- fix-40548_v1.0_2026-09-10.patch | 71 ------------------- litellm/proxy/proxy_server.py | 19 +++-- .../proxy/proxy_server/test_proxy_config.py | 18 ++--- 3 files changed, 17 insertions(+), 91 deletions(-) delete mode 100644 fix-40548_v1.0_2026-09-10.patch diff --git a/fix-40548_v1.0_2026-09-10.patch b/fix-40548_v1.0_2026-09-10.patch deleted file mode 100644 index a7d5a82011b..00000000000 --- a/fix-40548_v1.0_2026-09-10.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py -index 9269fd4..365f5c8 100644 ---- a/litellm/proxy/proxy_server.py -+++ b/litellm/proxy/proxy_server.py -@@ -6244,12 +6244,17 @@ class ProxyConfig: - model.model_info["db_model"] = True - model.model_info["blocked"] = bool(getattr(model, "blocked", False)) - -- if premium_user is True: -- # seeing "created_at", "updated_at", "created_by", "updated_by" is a LiteLLM Enterprise Feature -- model.model_info["created_at"] = getattr(model, "created_at", None) -- model.model_info["updated_at"] = getattr(model, "updated_at", None) -- model.model_info["created_by"] = getattr(model, "created_by", None) -- model.model_info["updated_by"] = getattr(model, "updated_by", None) -+ # NOTE: previously gated behind `premium_user`, which meant that on -+ # any proxy instance without an Enterprise license these fields were -+ # never populated -- the Model Management > All Models UI always -+ # rendered "Unknown" / "Unknown date" for every DB-backed model, -+ # regardless of who created it. This metadata already lives on the -+ # DB row itself (it isn't derived/enterprise-only), so always copy -+ # it over. See https://github.com/BerriAI/litellm/issues/40548 -+ model.model_info["created_at"] = getattr(model, "created_at", None) -+ model.model_info["updated_at"] = getattr(model, "updated_at", None) -+ model.model_info["created_by"] = getattr(model, "created_by", None) -+ model.model_info["updated_by"] = getattr(model, "updated_by", None) - - if model.model_info is not None and isinstance(model.model_info, dict): - if "id" not in model.model_info: -diff --git a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py -index e79448d..4fa4b10 100644 ---- a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py -+++ b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py -@@ -2202,6 +2202,38 @@ def test_ProxyConfig_get_model_info_with_id_missing_model_id_raises(monkeypatch) - pc.get_model_info_with_id(model=bad) - - -+@pytest.mark.parametrize("premium_user", [True, False]) -+def test_ProxyConfig_get_model_info_with_id_populates_audit_fields_regardless_of_license( -+ monkeypatch, premium_user -+): -+ """Regression test for https://github.com/BerriAI/litellm/issues/40548 -+ -+ `created_at` / `updated_at` / `created_by` / `updated_by` come straight -+ off the DB row and must be surfaced on `model_info` whether or not the -+ instance has an Enterprise license. Previously they were only copied -+ over `if premium_user is True`, so on non-premium proxies the Model -+ Management > All Models table always showed "Unknown" / "Unknown date" -+ for every model. -+ """ -+ monkeypatch.setattr("litellm.proxy.proxy_server.premium_user", premium_user) -+ pc = ProxyConfig() -+ model = SimpleNamespace( -+ model_id="m-1", -+ model_info={"id": "m-1"}, -+ blocked=False, -+ created_at="2026-01-01T00:00:00Z", -+ updated_at="2026-01-02T00:00:00Z", -+ created_by="malay@example.com", -+ updated_by="malay@example.com", -+ ) -+ out = pc.get_model_info_with_id(model=model, db_model=True) -+ dumped = out.model_dump() -+ assert dumped.get("created_at") == "2026-01-01T00:00:00Z" -+ assert dumped.get("updated_at") == "2026-01-02T00:00:00Z" -+ assert dumped.get("created_by") == "malay@example.com" -+ assert dumped.get("updated_by") == "malay@example.com" -+ -+ - # --------------------------------------------------------------------------- - # ProxyConfig._delete_deployment - # --------------------------------------------------------------------------- diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index e6262cece55..46876d21cf1 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -6241,13 +6241,7 @@ class ProxyConfig: model.model_info["db_model"] = True model.model_info["blocked"] = bool(getattr(model, "blocked", False)) - # NOTE: previously gated behind `premium_user`, which meant that on - # any proxy instance without an Enterprise license these fields were - # never populated -- the Model Management > All Models UI always - # rendered "Unknown" / "Unknown date" for every DB-backed model, - # regardless of who created it. This metadata already lives on the - # DB row itself (it isn't derived/enterprise-only), so always copy - # it over. See https://github.com/BerriAI/litellm/issues/40548 + # Always copy from the DB row, not gated behind premium_user. See #40548 model.model_info["created_at"] = getattr(model, "created_at", None) model.model_info["updated_at"] = getattr(model, "updated_at", None) model.model_info["created_by"] = getattr(model, "created_by", None) @@ -14263,6 +14257,17 @@ async def model_info_v2( # Translate `model_name` to the public name for team-scoped rows. all_models = [_translate_model_name_for_response(m) for m in all_models] + if user_api_key_dict.user_role not in ( + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + ): + all_models = [ + {**m, "model_info": {**m["model_info"], "created_by": None, "updated_by": None}} + if isinstance(m, dict) and isinstance(m.get("model_info"), dict) + else m + for m in all_models + ] + return _paginate_models_response( all_models=all_models, page=page, diff --git a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py index 4fa4b10cecf..fb9b0b5a7cb 100644 --- a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py +++ b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py @@ -2206,15 +2206,7 @@ def test_ProxyConfig_get_model_info_with_id_missing_model_id_raises(monkeypatch) def test_ProxyConfig_get_model_info_with_id_populates_audit_fields_regardless_of_license( monkeypatch, premium_user ): - """Regression test for https://github.com/BerriAI/litellm/issues/40548 - - `created_at` / `updated_at` / `created_by` / `updated_by` come straight - off the DB row and must be surfaced on `model_info` whether or not the - instance has an Enterprise license. Previously they were only copied - over `if premium_user is True`, so on non-premium proxies the Model - Management > All Models table always showed "Unknown" / "Unknown date" - for every model. - """ + """Audit fields must be surfaced on `model_info` regardless of license. See #40548""" monkeypatch.setattr("litellm.proxy.proxy_server.premium_user", premium_user) pc = ProxyConfig() model = SimpleNamespace( @@ -2223,15 +2215,15 @@ def test_ProxyConfig_get_model_info_with_id_populates_audit_fields_regardless_of blocked=False, created_at="2026-01-01T00:00:00Z", updated_at="2026-01-02T00:00:00Z", - created_by="malay@example.com", - updated_by="malay@example.com", + created_by="test-user@example.com", + updated_by="test-user@example.com", ) out = pc.get_model_info_with_id(model=model, db_model=True) dumped = out.model_dump() assert dumped.get("created_at") == "2026-01-01T00:00:00Z" assert dumped.get("updated_at") == "2026-01-02T00:00:00Z" - assert dumped.get("created_by") == "malay@example.com" - assert dumped.get("updated_by") == "malay@example.com" + assert dumped.get("created_by") == "test-user@example.com" + assert dumped.get("updated_by") == "test-user@example.com" # --------------------------------------------------------------------------- From 5c118f4ed75d0a15c92d97ac89d3b132c1a8ad9f Mon Sep 17 00:00:00 2001 From: Som0111 Date: Thu, 10 Sep 2026 12:40:07 +0530 Subject: [PATCH 3/5] fix(proxy): guard model_info None check, fix test datetime assertions, remove redundant isinstance --- litellm/proxy/proxy_server.py | 11 ++++++----- .../proxy/proxy_server/test_proxy_config.py | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 46876d21cf1..2086532c3c9 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -6242,10 +6242,11 @@ class ProxyConfig: model.model_info["blocked"] = bool(getattr(model, "blocked", False)) # Always copy from the DB row, not gated behind premium_user. See #40548 - model.model_info["created_at"] = getattr(model, "created_at", None) - model.model_info["updated_at"] = getattr(model, "updated_at", None) - model.model_info["created_by"] = getattr(model, "created_by", None) - model.model_info["updated_by"] = getattr(model, "updated_by", None) + if model.model_info is not None: + model.model_info["created_at"] = getattr(model, "created_at", None) + model.model_info["updated_at"] = getattr(model, "updated_at", None) + model.model_info["created_by"] = getattr(model, "created_by", None) + model.model_info["updated_by"] = getattr(model, "updated_by", None) if model.model_info is not None and isinstance(model.model_info, dict): if "id" not in model.model_info: @@ -14263,7 +14264,7 @@ async def model_info_v2( ): all_models = [ {**m, "model_info": {**m["model_info"], "created_by": None, "updated_by": None}} - if isinstance(m, dict) and isinstance(m.get("model_info"), dict) + if isinstance(m.get("model_info"), dict) else m for m in all_models ] diff --git a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py index fb9b0b5a7cb..92c7508debb 100644 --- a/tests/test_litellm/proxy/proxy_server/test_proxy_config.py +++ b/tests/test_litellm/proxy/proxy_server/test_proxy_config.py @@ -12,6 +12,7 @@ import json import logging import os import re +from datetime import datetime, timezone from types import SimpleNamespace from typing import Any, Dict from unittest.mock import AsyncMock, MagicMock @@ -2220,8 +2221,8 @@ def test_ProxyConfig_get_model_info_with_id_populates_audit_fields_regardless_of ) out = pc.get_model_info_with_id(model=model, db_model=True) dumped = out.model_dump() - assert dumped.get("created_at") == "2026-01-01T00:00:00Z" - assert dumped.get("updated_at") == "2026-01-02T00:00:00Z" + assert dumped.get("created_at") == datetime(2026, 1, 1, tzinfo=timezone.utc) + assert dumped.get("updated_at") == datetime(2026, 1, 2, tzinfo=timezone.utc) assert dumped.get("created_by") == "test-user@example.com" assert dumped.get("updated_by") == "test-user@example.com" From 6f47b345b5a10ec71dbd355cac82f6ef0c995d59 Mon Sep 17 00:00:00 2001 From: Som0111 Date: Thu, 10 Sep 2026 22:58:24 +0530 Subject: [PATCH 4/5] fix(terraform): keep state clean on failed key update --- terraform/provider/litellm/resource_key.go | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/provider/litellm/resource_key.go b/terraform/provider/litellm/resource_key.go index ffdc448f5fe..018d01f75a8 100644 --- a/terraform/provider/litellm/resource_key.go +++ b/terraform/provider/litellm/resource_key.go @@ -327,6 +327,7 @@ func resourceKeyUpdate(ctx context.Context, d *schema.ResourceData, m interface{ key.Metadata = metadata if _, err := c.UpdateKey(key); err != nil { + d.Partial(true) return diag.FromErr(fmt.Errorf("error updating key: %s", err)) } From 0757effffaade75cb9024d906c8a9c14e6d54e3a Mon Sep 17 00:00:00 2001 From: Som0111 Date: Thu, 10 Sep 2026 23:28:33 +0530 Subject: [PATCH 5/5] test: add coverage for created_by/updated_by masking in model list --- .../proxy_server/test_routes_model_info.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/tests/test_litellm/proxy/proxy_server/test_routes_model_info.py b/tests/test_litellm/proxy/proxy_server/test_routes_model_info.py index 4c141bcf698..d2d613bb104 100644 --- a/tests/test_litellm/proxy/proxy_server/test_routes_model_info.py +++ b/tests/test_litellm/proxy/proxy_server/test_routes_model_info.py @@ -541,3 +541,93 @@ def test_v2_model_info_access_group_paginates_over_the_filtered_set(client, auth assert _model_names(payload) == ["openai/*"] assert payload["total_count"] == 2 assert payload["total_pages"] == 2 + + +# --------------------------------------------------------------------------- +# GET /v2/model/info — created_by/updated_by masking for non-admin callers +# --------------------------------------------------------------------------- + + +@pytest.fixture +def audit_field_router(monkeypatch): + """Router with one audited deployment and one whose model_info isn't a dict.""" + model_list = [ + { + "model_name": "gpt-4-audited", + "litellm_params": {"model": "openai/gpt-4"}, + "model_info": { + "id": "audited-1", + "db_model": True, + "created_by": "alice@example.com", + "updated_by": "bob@example.com", + }, + }, + { + "model_name": "legacy-model", + "litellm_params": {"model": "openai/gpt-3.5-turbo"}, + "model_info": None, + }, + ] + from unittest.mock import AsyncMock + + router = MagicMock() + router.model_list = model_list + monkeypatch.setattr(proxy_server, "llm_router", router) + monkeypatch.setattr(proxy_server, "llm_model_list", model_list) + monkeypatch.setattr(proxy_server, "prisma_client", MagicMock()) + monkeypatch.setattr(proxy_server, "user_model", None) + monkeypatch.setattr(proxy_server.proxy_config, "get_config", AsyncMock(return_value={})) + monkeypatch.setattr( + proxy_server, + "_apply_search_filter_to_models", + AsyncMock(side_effect=lambda all_models, **kw: (all_models, len(all_models))), + ) + monkeypatch.setattr(proxy_server, "_enrich_model_info_with_litellm_data", lambda model, **kw: model) + + import litellm.proxy.agent_endpoints.model_list_helpers as mlh + + monkeypatch.setattr(mlh, "append_agents_to_model_info", AsyncMock(side_effect=lambda models, **kw: models)) + yield router + + +def _model_by_name(payload, name): + return next(m for m in payload["data"] if m["model_name"] == name) + + +def test_v2_model_info_non_admin_masks_created_by_updated_by(client, auth_as, audit_field_router): + """A non-admin caller must not see who created/last touched a model.""" + from litellm.proxy._types import LitellmUserRoles + + with auth_as(role=LitellmUserRoles.INTERNAL_USER): + response = client.get("/v2/model/info") + assert response.status_code == 200 + model = _model_by_name(response.json(), "gpt-4-audited") + assert model["model_info"]["created_by"] is None + assert model["model_info"]["updated_by"] is None + + +@pytest.mark.parametrize( + "role", + ["PROXY_ADMIN", "PROXY_ADMIN_VIEW_ONLY"], +) +def test_v2_model_info_admin_sees_created_by_updated_by(client, auth_as, audit_field_router, role): + """Both admin roles are exempt from the redaction and see the real audit trail.""" + from litellm.proxy._types import LitellmUserRoles + + with auth_as(role=getattr(LitellmUserRoles, role)): + response = client.get("/v2/model/info") + assert response.status_code == 200 + model = _model_by_name(response.json(), "gpt-4-audited") + assert model["model_info"]["created_by"] == "alice@example.com" + assert model["model_info"]["updated_by"] == "bob@example.com" + + +def test_v2_model_info_non_admin_skips_non_dict_model_info(client, auth_as, audit_field_router): + """A row whose model_info isn't a dict must pass through untouched instead of crashing.""" + from litellm.proxy._types import LitellmUserRoles + + with auth_as(role=LitellmUserRoles.INTERNAL_USER): + response = client.get("/v2/model/info") + assert response.status_code == 200 + model = _model_by_name(response.json(), "legacy-model") + assert model["model_info"] is None