fix: handles bug (#765)

This commit is contained in:
cthomas 2025-01-23 20:25:30 -08:00 committed by GitHub
parent 06ca10acb1
commit 0a0330ce07
2 changed files with 10 additions and 1 deletions

View File

@ -19,7 +19,7 @@ LLM_HANDLE_OVERRIDES: Dict[str, Dict[str, str]] = {
"gpt-4-turbo-2024-04-09": "gpt-4-turbo-apr",
"gpt-4o-2024-05-13": "gpt-4o-may",
"gpt-4o-2024-08-06": "gpt-4o-aug",
"gpt-4o-mini-2024-07-18": "gpt-4o-mini",
"gpt-4o-mini-2024-07-18": "gpt-4o-mini-jul",
},
"together": {
"Qwen/Qwen2.5-72B-Instruct-Turbo": "qwen-2.5-72b-instruct",

View File

@ -1238,3 +1238,12 @@ def test_messages_with_provider_override(server: SyncServer, user_id: str):
assert completion_tokens == usage.completion_tokens
assert prompt_tokens == usage.prompt_tokens
assert total_tokens == usage.total_tokens
def test_unique_handles_for_provider_configs(server: SyncServer):
models = server.list_llm_models()
model_handles = [model.handle for model in models]
assert sorted(model_handles) == sorted(list(set(model_handles))), "All models should have unique handles"
embeddings = server.list_embedding_models()
embedding_handles = [embedding.handle for embedding in embeddings]
assert sorted(embedding_handles) == sorted(list(set(embedding_handles))), "All embeddings should have unique handles"