Skip to content

Commit d6e0ee9

Browse files
committed
remove SambaNovaInferenceAdapter's custom register_model in favor of the mixin's behavior
1 parent 6711fd4 commit d6e0ee9

File tree

1 file changed

+0
-19
lines changed
  • llama_stack/providers/remote/inference/sambanova

1 file changed

+0
-19
lines changed

llama_stack/providers/remote/inference/sambanova/sambanova.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
# This source code is licensed under the terms described in the LICENSE file in
55
# the root directory of this source tree.
66

7-
import requests
8-
9-
from llama_stack.apis.models import Model
107
from llama_stack.log import get_logger
118
from llama_stack.providers.utils.inference.litellm_openai_mixin import LiteLLMOpenAIMixin
129

@@ -33,22 +30,6 @@ def __init__(self, config: SambaNovaImplConfig):
3330
json_schema_strict=False, # SambaNova doesn't support strict=True yet
3431
)
3532

36-
async def register_model(self, model: Model) -> Model:
37-
model_id = self.get_provider_model_id(model.provider_resource_id)
38-
39-
list_models_url = self.config.url + "/models"
40-
if len(self.environment_available_models) == 0:
41-
try:
42-
response = requests.get(list_models_url)
43-
response.raise_for_status()
44-
except requests.exceptions.RequestException as e:
45-
raise RuntimeError(f"Request to {list_models_url} failed") from e
46-
self.environment_available_models = [model.get("id") for model in response.json().get("data", {})]
47-
48-
if model_id.split("sambanova/")[-1] not in self.environment_available_models:
49-
logger.warning(f"Model {model_id} not available in {list_models_url}")
50-
return model
51-
5233
async def initialize(self):
5334
await super().initialize()
5435

0 commit comments

Comments
 (0)