mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-11 12:38:02 +00:00
chore: improve pytest api not found exception
Signed-off-by: reidliu <reid201711@gmail.com>
This commit is contained in:
parent
ff853ccc38
commit
e7d038ce47
1 changed files with 3 additions and 0 deletions
|
@ -249,6 +249,9 @@ def run_config_from_adhoc_config_spec(
|
|||
provider_configs_by_api = {}
|
||||
for api_provider in api_providers:
|
||||
api_str, provider = api_provider.split("=")
|
||||
|
||||
if api_str not in Api:
|
||||
raise ValueError(f"invalid API ({api_str})")
|
||||
api = Api(api_str)
|
||||
|
||||
providers_by_type = provider_registry[api]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue