Include context length in /v1/models response. (#4809)

This commit is contained in:
Jon Durbin
2025-03-27 23:23:18 -04:00
committed by GitHub
parent e84f4ba0ab
commit 04eb6062e4
3 changed files with 14 additions and 1 deletions

View File

@@ -542,6 +542,12 @@ The SmartHome Mini is a compact smart home assistant available in black or white
.startswith('"name": "SmartHome Mini",')
)
def test_model_list(self):
client = openai.Client(api_key=self.api_key, base_url=self.base_url)
models = list(client.models.list())
assert len(models) == 1
assert isinstance(getattr(models[0], "max_model_len", None), int)
# -------------------------------------------------------------------------
# EBNF Test Class: TestOpenAIServerEBNF