feat: allow user to register model alias explicitly, tests

# What does this PR do?

Context: https://github.com/llamastack/llama-stack/discussions/3483

This PR enables the registering `provider_model_id` as the model identifier without breaking backward compatibility.


## Test Plan
todo
# What does this PR do?


## Test Plan
This commit is contained in:
Eric Huang 2025-09-18 15:47:20 -07:00
parent ac1414b571
commit 83a229554b
20 changed files with 236 additions and 92 deletions

View file

@ -73,11 +73,11 @@ def get_distribution_template() -> DistributionTemplate:
)
inference_model = ModelInput(
model_id="${env.INFERENCE_MODEL}",
provider_model_id="${env.INFERENCE_MODEL}",
provider_id="meta-reference-inference",
)
embedding_model = ModelInput(
model_id="all-MiniLM-L6-v2",
provider_model_id="all-MiniLM-L6-v2",
provider_id="sentence-transformers",
model_type=ModelType.embedding,
metadata={
@ -85,7 +85,7 @@ def get_distribution_template() -> DistributionTemplate:
},
)
safety_model = ModelInput(
model_id="${env.SAFETY_MODEL}",
provider_model_id="${env.SAFETY_MODEL}",
provider_id="meta-reference-safety",
)
default_tool_groups = [