Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test text-embedding-ada-002

Ishaan Jaffer6aa35ec9999c
diff --git a/tests/local_testing/test_caching.py b/tests/local_testing/test_caching.py
index 3fb3ae3db4c..ee3082a9d32 100644
--- a/tests/local_testing/test_caching.py
+++ b/tests/local_testing/test_caching.py
@@ -1627,7 +1627,7 @@ def test_get_cache_key():
embedding_cache_key = cache_instance.get_cache_key(
**{
- "model": "azure/azure-embedding-model",
+ "model": "azure/text-embedding-ada-002",
"api_base": "https://openai-gpt-4-test-v-1.openai.azure.com/",
"api_key": "",
"api_version": "2023-07-01-preview",
@@ -1642,19 +1642,19 @@ def test_get_cache_key():
print(embedding_cache_key)
embedding_cache_key_str = (
- "model: azure/azure-embedding-modelinput: ['hi who is ishaan']"
+ "model: azure/text-embedding-ada-002input: ['hi who is ishaan']"
)
hash_object = hashlib.sha256(embedding_cache_key_str.encode())
# Hexadecimal representation of the hash
hash_hex = hash_object.hexdigest()
assert (
embedding_cache_key == hash_hex
- ), f"{embedding_cache_key} != 'model: azure/azure-embedding-modelinput: ['hi who is ishaan']'. The same kwargs should have the same cache key across runs"
+ ), f"{embedding_cache_key} != 'model: azure/text-embedding-ada-002input: ['hi who is ishaan']'. The same kwargs should have the same cache key across runs"
# Proxy - embedding cache, test if embedding key, gets model_group and not model
embedding_cache_key_2 = cache_instance.get_cache_key(
**{
- "model": "azure/azure-embedding-model",
+ "model": "azure/text-embedding-ada-002",
"api_base": "https://openai-gpt-4-test-v-1.openai.azure.com/",
"api_key": "",
"api_version": "2023-07-01-preview",
@@ -1689,7 +1689,7 @@ def test_get_cache_key():
"content-length": "80",
},
"model_group": "EMBEDDING_MODEL_GROUP",
- "deployment": "azure/azure-embedding-model-ModelID-azure/azure-embedding-modelhttps://openai-gpt-4-test-v-1.openai.azure.com/2023-07-01-preview",
+ "deployment": "azure/text-embedding-ada-002-ModelID-azure/text-embedding-ada-002https://openai-gpt-4-test-v-1.openai.azure.com/2023-07-01-preview",
},
"model_info": {
"mode": "embedding",
diff --git a/tests/local_testing/test_completion_cost.py b/tests/local_testing/test_completion_cost.py
index 8b546b8427e..9b2d747cfca 100644
--- a/tests/local_testing/test_completion_cost.py
+++ b/tests/local_testing/test_completion_cost.py
@@ -283,7 +283,7 @@ def test_cost_azure_embedding():
async def _test():
response = await litellm.aembedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm", "gm"],
)
diff --git a/tests/local_testing/test_configs/test_bad_config.yaml b/tests/local_testing/test_configs/test_bad_config.yaml
index 08f6c249711..ae699fdecb0 100644
--- a/tests/local_testing/test_configs/test_bad_config.yaml
+++ b/tests/local_testing/test_configs/test_bad_config.yaml
@@ -15,7 +15,7 @@ model_list:
api_key: bad-key
- model_name: azure-embedding
litellm_params:
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
api_base: os.environ/AZURE_API_BASE
api_key: bad-key
\ No newline at end of file
diff --git a/tests/local_testing/test_configs/test_config_no_auth.yaml b/tests/local_testing/test_configs/test_config_no_auth.yaml
index a1d14a53655..1ddfee464ff 100644
--- a/tests/local_testing/test_configs/test_config_no_auth.yaml
+++ b/tests/local_testing/test_configs/test_config_no_auth.yaml
@@ -52,7 +52,7 @@ model_list:
api_base: os.environ/AZURE_API_BASE
api_key: os.environ/AZURE_API_KEY
api_version: 2023-07-01-preview
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
model_info:
mode: embedding
model_name: azure-embedding-model
@@ -105,7 +105,7 @@ model_list:
api_base: os.environ/AZURE_API_BASE
api_key: os.environ/AZURE_API_KEY
api_version: 2023-07-01-preview
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
model_info:
base_model: text-embedding-ada-002
mode: embedding
diff --git a/tests/local_testing/test_configs/test_custom_logger.yaml b/tests/local_testing/test_configs/test_custom_logger.yaml
index 698567d9ef9..eb3d623f473 100644
--- a/tests/local_testing/test_configs/test_custom_logger.yaml
+++ b/tests/local_testing/test_configs/test_custom_logger.yaml
@@ -11,7 +11,7 @@ model_list:
id: gm
- model_name: azure-embedding-model
litellm_params:
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
api_base: os.environ/AZURE_API_BASE
api_key: os.environ/AZURE_API_KEY
api_version: "2023-07-01-preview"
diff --git a/tests/local_testing/test_custom_callback_input.py b/tests/local_testing/test_custom_callback_input.py
index 64336f77f0e..36fa31f4ac1 100644
--- a/tests/local_testing/test_custom_callback_input.py
+++ b/tests/local_testing/test_custom_callback_input.py
@@ -774,8 +774,7 @@ async def test_async_embedding_openai():
customHandler_failure = CompletionCustomHandler()
litellm.callbacks = [customHandler_success]
response = await litellm.aembedding(
- model="azure/azure-embedding-model", input=["good morning from litellm"]
- )
+ model="azure/text-embedding-ada-002",
await asyncio.sleep(1)
print(f"customHandler_success.errors: {customHandler_success.errors}")
print(f"customHandler_success.states: {customHandler_success.states}")
@@ -811,7 +810,7 @@ def test_amazing_sync_embedding():
customHandler_failure = CompletionCustomHandler()
litellm.callbacks = [customHandler_success]
response = litellm.embedding(
- model="azure/azure-embedding-model", input=["good morning from litellm"]
+ model="azure/text-embedding-ada-002", input=["good morning from litellm"]
)
print(f"customHandler_success.errors: {customHandler_success.errors}")
print(f"customHandler_success.states: {customHandler_success.states}")
@@ -823,7 +822,7 @@ def test_amazing_sync_embedding():
litellm.callbacks = [customHandler_failure]
try:
response = litellm.embedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm"],
api_key="my-bad-key",
)
@@ -846,7 +845,7 @@ async def test_async_embedding_azure():
customHandler_failure = CompletionCustomHandler()
litellm.callbacks = [customHandler_success]
response = await litellm.aembedding(
- model="azure/azure-embedding-model", input=["good morning from litellm"]
+ model="azure/text-embedding-ada-002", input=["good morning from litellm"]
)
await asyncio.sleep(1)
print(f"customHandler_success.errors: {customHandler_success.errors}")
@@ -858,7 +857,7 @@ async def test_async_embedding_azure():
litellm.callbacks = [customHandler_failure]
try:
response = await litellm.aembedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm"],
api_key="my-bad-key",
)
diff --git a/tests/local_testing/test_embedding.py b/tests/local_testing/test_embedding.py
index 06f8346994f..bf60fe23b88 100644
--- a/tests/local_testing/test_embedding.py
+++ b/tests/local_testing/test_embedding.py
@@ -107,7 +107,7 @@ def test_openai_embedding_3():
@pytest.mark.parametrize(
"model, api_base, api_key",
[
- # ("azure/azure-embedding-model", None, None),
+ # ("azure/text-embedding-ada-002", None, None),
("together_ai/togethercomputer/m2-bert-80M-8k-retrieval", None, None),
],
)
@@ -253,7 +253,7 @@ async def test_azure_ai_embedding_image(model, api_base, api_key, sync_mode):
def test_openai_azure_embedding_timeouts():
try:
response = embedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm"],
timeout=0.00001,
)
@@ -301,7 +301,7 @@ def test_openai_azure_embedding():
os.environ["AZURE_API_KEY"] = ""
response = embedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm", "this is another item"],
api_key=api_key,
api_base=api_base,
@@ -726,7 +726,7 @@ def test_aembedding_azure():
async def embedding_call():
try:
response = await litellm.aembedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm", "this is another item"],
)
print(response)
@@ -1099,7 +1099,7 @@ async def test_lm_studio_embedding(monkeypatch, sync_mode):
"model",
[
"text-embedding-ada-002",
- "azure/azure-embedding-model",
+ "azure/text-embedding-ada-002",
],
)
def test_embedding_response_ratelimit_headers(model):
diff --git a/tests/local_testing/test_exceptions.py b/tests/local_testing/test_exceptions.py
index ca69f7e99db..3ac9ef68f07 100644
--- a/tests/local_testing/test_exceptions.py
+++ b/tests/local_testing/test_exceptions.py
@@ -282,7 +282,7 @@ def test_azure_embedding_exceptions():
try:
response = litellm.embedding(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input="hello",
mock_response="error",
)
diff --git a/tests/local_testing/test_mem_usage.py b/tests/local_testing/test_mem_usage.py
index 7c5e74331f1..85ecd568789 100644
--- a/tests/local_testing/test_mem_usage.py
+++ b/tests/local_testing/test_mem_usage.py
@@ -51,7 +51,7 @@
# {
# "model_name": "text-embedding-ada-002",
# "litellm_params": {
-# "model": "azure/azure-embedding-model",
+# "model": "azure/text-embedding-ada-002",
# "api_key": os.environ["AZURE_API_KEY"],
# "api_base": os.environ["AZURE_API_BASE"],
# },
diff --git a/tests/local_testing/test_router_fallbacks.py b/tests/local_testing/test_router_fallbacks.py
index d539441fa2d..52c37f4cb61 100644
--- a/tests/local_testing/test_router_fallbacks.py
+++ b/tests/local_testing/test_router_fallbacks.py
@@ -239,7 +239,7 @@ def test_sync_fallbacks_embeddings():
{ # list of model deployments
"model_name": "bad-azure-embedding-model", # openai model name
"litellm_params": { # params for litellm completion/embedding call
- "model": "azure/azure-embedding-model",
+ "model": "azure/text-embedding-ada-002",
"api_key": "bad-key",
"api_version": os.getenv("AZURE_API_VERSION"),
"api_base": os.getenv("AZURE_API_BASE"),
@@ -289,7 +289,7 @@ async def test_async_fallbacks_embeddings():
{ # list of model deployments
"model_name": "bad-azure-embedding-model", # openai model name
"litellm_params": { # params for litellm completion/embedding call
- "model": "azure/azure-embedding-model",
+ "model": "azure/text-embedding-ada-002",
"api_key": "bad-key",
"api_version": os.getenv("AZURE_API_VERSION"),
"api_base": os.getenv("AZURE_API_BASE"),
diff --git a/tests/logging_callback_tests/test_custom_callback_router.py b/tests/logging_callback_tests/test_custom_callback_router.py
index 64cafb875b5..f7c0c436ece 100644
--- a/tests/logging_callback_tests/test_custom_callback_router.py
+++ b/tests/logging_callback_tests/test_custom_callback_router.py
@@ -503,7 +503,7 @@ async def test_async_embedding_azure():
{
"model_name": "azure-embedding-model", # openai model name
"litellm_params": { # params for litellm completion/embedding call
- "model": "azure/azure-embedding-model",
+ "model": "azure/text-embedding-ada-002",
"api_key": "my-bad-key",
"api_version": os.getenv("AZURE_API_VERSION"),
"api_base": os.getenv("AZURE_API_BASE"),
diff --git a/tests/proxy_unit_tests/test_configs/test_bad_config.yaml b/tests/proxy_unit_tests/test_configs/test_bad_config.yaml
index 08f6c249711..ae699fdecb0 100644
--- a/tests/proxy_unit_tests/test_configs/test_bad_config.yaml
+++ b/tests/proxy_unit_tests/test_configs/test_bad_config.yaml
@@ -15,7 +15,7 @@ model_list:
api_key: bad-key
- model_name: azure-embedding
litellm_params:
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
api_base: os.environ/AZURE_API_BASE
api_key: bad-key
\ No newline at end of file
diff --git a/tests/proxy_unit_tests/test_configs/test_config_no_auth.yaml b/tests/proxy_unit_tests/test_configs/test_config_no_auth.yaml
index a1d14a53655..1ddfee464ff 100644
--- a/tests/proxy_unit_tests/test_configs/test_config_no_auth.yaml
+++ b/tests/proxy_unit_tests/test_configs/test_config_no_auth.yaml
@@ -52,7 +52,7 @@ model_list:
api_base: os.environ/AZURE_API_BASE
api_key: os.environ/AZURE_API_KEY
api_version: 2023-07-01-preview
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
model_info:
mode: embedding
model_name: azure-embedding-model
@@ -105,7 +105,7 @@ model_list:
api_base: os.environ/AZURE_API_BASE
api_key: os.environ/AZURE_API_KEY
api_version: 2023-07-01-preview
- model: azure/azure-embedding-model
+ model: azure/text-embedding-ada-002
model_info:
base_model: text-embedding-ada-002
mode: embedding
diff --git a/tests/proxy_unit_tests/test_proxy_server.py b/tests/proxy_unit_tests/test_proxy_server.py
index 712207bdf2d..c5aff27501f 100644
--- a/tests/proxy_unit_tests/test_proxy_server.py
+++ b/tests/proxy_unit_tests/test_proxy_server.py
@@ -541,14 +541,14 @@ def test_embedding(mock_aembedding, client_no_auth):
try:
test_data = {
- "model": "azure/azure-embedding-model",
+ "model": "azure/text-embedding-ada-002",
"input": ["good morning from litellm"],
}
response = client_no_auth.post("/v1/embeddings", json=test_data)
mock_aembedding.assert_called_once_with(
- model="azure/azure-embedding-model",
+ model="azure/text-embedding-ada-002",
input=["good morning from litellm"],
specific_deployment=True,
metadata=mock.ANY,