feat(vllm): periodically refresh models#2823
Merged
ashwinb merged 3 commits intollamastack:mainfrom Jul 18, 2025
Merged
Conversation
ehhuang
approved these changes
Jul 18, 2025
|
|
||
| if not self.config.url: | ||
| raise ValueError( | ||
| "You must provide a vLLM URL in the run.yaml file (or set the VLLM_URL environment variable)" |
Contributor
There was a problem hiding this comment.
or set the VLLM_URL environment variable
is this correct in general? (non-starter templates)?
Contributor
Author
There was a problem hiding this comment.
@ehhuang yes I think it is correct, because any template will have the same config struct derived from sample_run_config()
Nehanth
pushed a commit
to Nehanth/llama-stack
that referenced
this pull request
Jul 23, 2025
Just like llamastack#2805 but for vLLM. We also make VLLM_URL env variable optional (not required) -- if not specified, the provider silently sits idle and yells eventually if someone tries to call a completion on it. This is done so as to allow this provider to be present in the `starter` distribution. ## Test Plan Set up vLLM, copy the starter template and set `{ refresh_models: true, refresh_models_interval: 10 }` for the vllm provider and then run: ``` ENABLE_VLLM=vllm VLLM_URL=http://localhost:8000/v1 \ uv run llama stack run --image-type venv /tmp/starter.yaml ``` Verify that `llama-stack-client models list` brings up the model correctly from vLLM.
ashwinb
added a commit
that referenced
this pull request
Jul 24, 2025
This flips #2823 and #2805 by making the Stack periodically query the providers for models rather than the providers going behind the back and calling "register" on to the registry themselves. This also adds support for model listing for all other providers via `ModelRegistryHelper`. Once this is done, we do not need to manually list or register models via `run.yaml` and it will remove both noise and annoyance (setting `INFERENCE_MODEL` environment variables, for example) from the new user experience. In addition, it adds a configuration variable `allowed_models` which can be used to optionally restrict the set of models exposed from a provider.
ChristianZaccaria
pushed a commit
to ChristianZaccaria/llama-stack
that referenced
this pull request
Jul 28, 2025
…mastack#2862) This flips llamastack#2823 and llamastack#2805 by making the Stack periodically query the providers for models rather than the providers going behind the back and calling "register" on to the registry themselves. This also adds support for model listing for all other providers via `ModelRegistryHelper`. Once this is done, we do not need to manually list or register models via `run.yaml` and it will remove both noise and annoyance (setting `INFERENCE_MODEL` environment variables, for example) from the new user experience. In addition, it adds a configuration variable `allowed_models` which can be used to optionally restrict the set of models exposed from a provider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just like #2805 but for vLLM.
We also make VLLM_URL env variable optional (not required) -- if not specified, the provider silently sits idle and yells eventually if someone tries to call a completion on it. This is done so as to allow this provider to be present in the
starterdistribution.Test Plan
Set up vLLM, copy the starter template and set
{ refresh_models: true, refresh_models_interval: 10 }for the vllm provider and then run:Verify that
llama-stack-client models listbrings up the model correctly from vLLM.