/v1/models endpoint

Your openai compatible api is missing the /v1/models endpoint for listing the currently available models. Openai’s specification for the endpoint can be found here.

Can this endpoint be made available so that the list of available models can be retrieved and displayed on the end user’s application in real time?

3 Likes

yes this is the issue im facing too

2 Likes

We definitely understand the requirement and we have an enhancement request opened for this functionality. We’re working on an ETA.
Thanks & Regards

@matthew.malek and @nds

There is an enhancement on the way for that . I do not have the exact date of delivery though .

awesome news! thanks for the reply. looking forward to it.

Right now the only way to get all available models is through python (bs4) script.

I’m using this python/python3 script.

import requests
from bs4 import BeautifulSoup

def get_sambanova_models():
    # Hey, wanna see something crazy?
    # SambaNova offers no model listing API endpoint at the moment.
    # However, we can scrape it from the documentation:
    # https://community.sambanova.ai/t/supported-models
    response = requests.get("https://community.sambanova.ai/t/supported-models")
    response.raise_for_status()
    soup = BeautifulSoup(response.text, "html.parser")
    code_texts = [code.get_text() for code in soup.find_all("code")]
    return code_texts

if __name__ == "__main__":
    models = get_sambanova_models()
    for model in models:
        print(model)
1 Like