mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-29 23:54:17 +00:00
live listing overrides static listing for ollama & vllm model registration
This commit is contained in:
parent
a4c8a849b6
commit
c590674ee2
2 changed files with 8 additions and 2 deletions
|
|
@ -358,7 +358,10 @@ class VLLMInferenceAdapter(Inference, ModelsProtocolPrivate):
|
|||
|
||||
async def register_model(self, model: Model) -> Model:
|
||||
assert self.client is not None
|
||||
model = await self.register_helper.register_model(model)
|
||||
try:
|
||||
model = await self.register_helper.register_model(model)
|
||||
except ValueError:
|
||||
pass # Ignore statically unknown model, will check live listing
|
||||
res = await self.client.models.list()
|
||||
available_models = [m.id async for m in res]
|
||||
if model.provider_resource_id not in available_models:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue