mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 04:42:25 +00:00
test: add comprehensive tests for enhanced model registration and lookup
- Add 3 new test cases covering alias registration, multi-provider disambiguation, and fallback lookup - Update existing tests to work with new namespaced identifier behavior - Improve error message with disambiguation guidance - Fix linting issues with assert statements
This commit is contained in:
parent
352bf3ec56
commit
d3dee496ec
2 changed files with 144 additions and 10 deletions
|
|
@ -68,7 +68,8 @@ class ModelsRoutingTable(CommonRoutingTableImpl, Models):
|
|||
provider_id = list(self.impls_by_provider_id.keys())[0]
|
||||
else:
|
||||
raise ValueError(
|
||||
f"Please specify a provider_id for model {model_id} since multiple providers are available: {self.impls_by_provider_id.keys()}"
|
||||
f"Please specify a provider_id for model {model_id} since multiple providers are available: {self.impls_by_provider_id.keys()}.\n\n"
|
||||
"Use the provider_id as a prefix to disambiguate, e.g. 'provider_id/model_id'."
|
||||
)
|
||||
|
||||
provider_model_id = provider_model_id or model_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue