access control unit test

This commit is contained in:
Ashwin Bharambe 2025-10-15 22:00:47 -07:00
parent ea0d342c5d
commit 54354257dc
2 changed files with 25 additions and 30 deletions

View file

@ -435,7 +435,8 @@ class OpenAIMixin(NeedsRequestProviderData, ABC, BaseModel):
"""
# First check if the model is pre-registered in the model store
if hasattr(self, "model_store") and self.model_store:
if await self.model_store.has_model(model):
qualified_model = f"{self.__provider_id__}/{model}"
if await self.model_store.has_model(qualified_model):
return True
# Then check the provider's dynamic model cache