mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-14 03:12:36 +00:00
feat: Add allow_listing_models
• Add allow_listing_models configuration flag to VLLM provider to control model listing behavior • Implement allow_listing_models() method across all providers with default implementations in base classes • Prevent HTTP requests to /v1/models endpoint when allow_listing_models=false for improved security and performance • Fix unit tests to include allow_listing_models method in test classes and mock objects
This commit is contained in:
parent
188a56af5c
commit
e9214f9004
15 changed files with 143 additions and 25 deletions
|
|
@ -52,6 +52,9 @@ class InferenceImpl(Impl):
|
|||
async def should_refresh_models(self):
|
||||
return False
|
||||
|
||||
async def allow_listing_models(self):
|
||||
return True
|
||||
|
||||
async def list_models(self):
|
||||
return [
|
||||
Model(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue