mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
fix: clear model cache when run.yaml model list changes
This commit is contained in:
parent
521865c388
commit
9e79e917f6
5 changed files with 99 additions and 3 deletions
|
@ -102,6 +102,11 @@ class DiskDistributionRegistry(DistributionRegistry):
|
|||
f"Object {existing_obj.type}:{existing_obj.identifier}'s {existing_obj.provider_id} provider is being replaced with {obj.provider_id}"
|
||||
)
|
||||
|
||||
# Skip persistence for from_config objects - they should only exist in memory
|
||||
if hasattr(obj, "source") and obj.source == "from_config":
|
||||
logger.debug(f"Skipping persistence for from_config object {obj.type}:{obj.identifier}")
|
||||
return True
|
||||
|
||||
await self.kvstore.set(
|
||||
KEY_FORMAT.format(type=obj.type, identifier=obj.identifier),
|
||||
obj.model_dump_json(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue