diff --git a/llama_stack/apis/models/models.py b/llama_stack/apis/models/models.py index aabe78d85c..cbd6265e29 100644 --- a/llama_stack/apis/models/models.py +++ b/llama_stack/apis/models/models.py @@ -31,6 +31,8 @@ def model_id(self) -> str: def provider_model_id(self) -> str: return self.provider_resource_id + model_config = ConfigDict(protected_namespaces=()) + class ModelInput(CommonModelFields): model_id: str diff --git a/llama_stack/cli/download.py b/llama_stack/cli/download.py index 07b40bd212..bb57186e54 100644 --- a/llama_stack/cli/download.py +++ b/llama_stack/cli/download.py @@ -19,7 +19,7 @@ from llama_models.datatypes import Model from llama_models.sku_list import LlamaDownloadInfo -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict from rich.console import Console from rich.progress import ( @@ -293,8 +293,8 @@ def has_disk_space(self, tasks: List[DownloadTask]) -> bool: if free_space < required_space: self.console.print( - f"[red]Not enough disk space. Required: {required_space // (1024*1024)} MB, " - f"Available: {free_space // (1024*1024)} MB[/red]" + f"[red]Not enough disk space. Required: {required_space // (1024 * 1024)} MB, " + f"Available: {free_space // (1024 * 1024)} MB[/red]" ) return False return True @@ -413,8 +413,7 @@ class ModelEntry(BaseModel): model_id: str files: Dict[str, str] - class Config: - protected_namespaces = () + model_config = ConfigDict(protected_namespaces=()) class Manifest(BaseModel):