mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 16:12:46 +00:00
more validation
This commit is contained in:
parent
ccb5445d2a
commit
acf9af841b
2 changed files with 37 additions and 4 deletions
|
|
@ -54,3 +54,20 @@ class TestModelRegistration:
|
|||
model_id="custom-model",
|
||||
metadata={"llama_model": CoreModelId.llama3_1_8b_instruct.value},
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError) as exc_info:
|
||||
await models_impl.register_model(
|
||||
model_id="custom-model-2",
|
||||
metadata={"llama_model": CoreModelId.llama3_2_3b_instruct.value},
|
||||
provider_model_id="custom-model",
|
||||
)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_register_with_invalid_llama_model(self, inference_stack):
|
||||
_, models_impl = inference_stack
|
||||
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
await models_impl.register_model(
|
||||
model_id="custom-model-2",
|
||||
metadata={"llama_model": "invalid-llama-model"},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue