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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test_together_ai_embedding
Ishaan Jaffer732618f55fab
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 1dcb01cedba..f8aa7e59a08 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -19710,6 +19710,22 @@"mode": "embedding","output_cost_per_token": 0.0},+ "together_ai/baai/bge-base-en-v1.5": {+ "input_cost_per_token": 8e-09,+ "litellm_provider": "together_ai",+ "max_input_tokens": 512,+ "mode": "embedding",+ "output_cost_per_token": 0.0,+ "output_vector_size": 768+ },+ "together_ai/BAAI/bge-base-en-v1.5": {+ "input_cost_per_token": 8e-09,+ "litellm_provider": "together_ai",+ "max_input_tokens": 512,+ "mode": "embedding",+ "output_cost_per_token": 0.0,+ "output_vector_size": 768+ },"together-ai-up-to-4b": {"input_cost_per_token": 1e-07,"litellm_provider": "together_ai",diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 1dcb01cedba..f8aa7e59a08 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -19710,6 +19710,22 @@"mode": "embedding","output_cost_per_token": 0.0},+ "together_ai/baai/bge-base-en-v1.5": {+ "input_cost_per_token": 8e-09,+ "litellm_provider": "together_ai",+ "max_input_tokens": 512,+ "mode": "embedding",+ "output_cost_per_token": 0.0,+ "output_vector_size": 768+ },+ "together_ai/BAAI/bge-base-en-v1.5": {+ "input_cost_per_token": 8e-09,+ "litellm_provider": "together_ai",+ "max_input_tokens": 512,+ "mode": "embedding",+ "output_cost_per_token": 0.0,+ "output_vector_size": 768+ },"together-ai-up-to-4b": {"input_cost_per_token": 1e-07,"litellm_provider": "together_ai",diff --git a/tests/local_testing/test_embedding.py b/tests/local_testing/test_embedding.pyindex 60e2a0764b7..29b0f45a57a 100644--- a/tests/local_testing/test_embedding.py+++ b/tests/local_testing/test_embedding.py@@ -108,12 +108,12 @@ def test_openai_embedding_3():"model, api_base, api_key",[# ("azure/text-embedding-ada-002", None, None),- ("together_ai/togethercomputer/m2-bert-80M-8k-retrieval", None, None),+ ("together_ai/BAAI/bge-base-en-v1.5", None, None), # Updated to current Together AI embedding model],)@pytest.mark.parametrize("sync_mode", [True, False])@pytest.mark.asyncio-async def test_openai_azure_embedding_simple(model, api_base, api_key, sync_mode):+async def test_together_ai_embedding(model, api_base, api_key, sync_mode):try:os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"litellm.model_cost = litellm.get_model_cost_map(url="")