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
fix(main.py): add sambanova api base support to embeddings
Krrish Dholakia280ad6f049fd
diff --git a/litellm/main.py b/litellm/main.pyindex 754b824e7dd..339d9e14406 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -1890,7 +1890,7 @@ def completion( # type: ignore # noqa: PLR0915or get_secret_str("COMETAPI_KEY")or litellm.api_key)-+api_base = (api_baseor litellm.api_base@@ -1917,7 +1917,7 @@ def completion( # type: ignore # noqa: PLR0915stream=stream,provider_config=provider_config,)-+## LOGGINGlogging.post_call(input=messages, api_key=api_key, original_response=response@@ -4281,6 +4281,12 @@ def embedding( # noqa: PLR0915)elif custom_llm_provider == "sambanova":api_key = api_key or litellm.api_key or get_secret_str("SAMBANOVA_API_KEY")+ api_base = (+ api_base+ or litellm.api_base+ or get_secret_str("SAMBANOVA_API_BASE")+ or "https://api.sambanova.ai/v1"+ )response = base_llm_http_handler.embedding(model=model,input=input,diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex cf1e7590906..1001aca9c09 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -16902,15 +16902,6 @@"supports_reasoning": true,"source": "https://cloud.sambanova.ai/plans/pricing"},- "sambanova/E5-Mistral-7B-Instruct": {- "max_tokens": 4096,- "max_input_tokens": 4096,- "input_cost_per_token": 1.3e-07,- "output_cost_per_token": 0.0,- "litellm_provider": "sambanova-embedding-models",- "mode": "embedding",- "source": "https://cloud.sambanova.ai/plans/pricing"- },"assemblyai/nano": {"mode": "audio_transcription","input_cost_per_second": 0.00010278,