mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-28 15:02:37 +00:00
chore: internal change, make Model.provider_model_id non-optional
POST /v1/models accepts optional provider_model_id ModelsRoutingTable.register_model handler ensures it is non-None, providing a default usage of Model.provider_model_id will no longer need to detect None
This commit is contained in:
parent
cd0ad21111
commit
7ba5a67224
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ class Model(CommonModelFields, Resource):
|
|||
return self.identifier
|
||||
|
||||
@property
|
||||
def provider_model_id(self) -> str | None:
|
||||
def provider_model_id(self) -> str:
|
||||
assert self.provider_resource_id is not None, "Provider resource ID must be set"
|
||||
return self.provider_resource_id
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue