mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
test(e2e): cover model registration persistence in /model/info (#33996)
Co-authored-by: mubashir1osmani <mubashir.osmani777@gmail.com>
This commit is contained in:
parent
3819ee5dc0
commit
71131190ec
1 changed files with 17 additions and 0 deletions
|
|
@ -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, (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue