test(e2e): cover model registration persistence in /model/info (#33996)

Co-authored-by: mubashir1osmani <mubashir.osmani777@gmail.com>
This commit is contained in:
Yassin Kortam 2026-07-20 15:17:40 -07:00 • committed by GitHub
parent 3819ee5dc0
commit 71131190ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -423,6 +423,23 @@ class TestModelRoutes:
"after /model/update",
)
@pytest.mark.covers("mgmt.model.add.persists")
def test_new_persists_to_model_info_catalog(
self, client: ManagementClient, resources: ResourceManager
) -> None:
model_name = f"e2e-mgmt-model-{unique_marker()}"
model_id = client.proxy.create_model(
model_name,
LiteLLMParamsBody(model="openai/gpt-5.5", api_key="e2e-dummy-key"),
)
resources.defer(lambda: client.proxy.delete_model(model_id))
cataloged = [entry.model_name for entry in client.proxy.model_info()]
assert model_name in cataloged, (
f"/model/info does not list {model_name!r} after /model/new; registration did not persist "
f"into the routing catalog: {cataloged}"
)
def _assert_route_forbidden(route: str, outcome: StreamingResponse) -> None:
assert outcome.status_code == 403, (