diff --git a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py index daa47ebf..46604bad 100644 --- a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py +++ b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py @@ -214,9 +214,12 @@ def __init__(self, **kwargs: Any): "unknown and inference may fail." ) else: - raise ValueError( - f"Model {self.mdl_name} is unknown, check `available_models`" - ) + if self.mdl_name.startswith("nvdev/"): # assume valid + model = Model(id=self.mdl_name) + else: + raise ValueError( + f"Model {self.mdl_name} is unknown, check `available_models`" + ) self.model = model self.mdl_name = self.model.id # name may change because of aliasing else: