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
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_scx_ai_provider
bhuvan21346861e24f93d3944
diff --cc litellm/constants.pyindex cc6d9e2b1e0,75f12190b3e..4e0bed264f6--- a/litellm/constants.py+++ b/litellm/constants.py@@@ -796,9 -817,8 +818,9 @@@ openai_compatible_providers: Final[list"pinstripes", # Pinstripes - JSON-configured provider"darkbloom","meta", # Meta Model API (Muse Spark) - JSON-configured provider+ "scx-ai",]- openai_text_completion_compatible_providers: List = [ # providers that support `/v1/completions`+ openai_text_completion_compatible_providers: Final[list] = [ # providers that support `/v1/completions`"together_ai","fireworks_ai","hosted_vllm",diff --cc litellm/litellm_core_utils/get_llm_provider_logic.pyindex 52a4f866fbd,dbb40913e14..01ffb442d69--- a/litellm/litellm_core_utils/get_llm_provider_logic.py+++ b/litellm/litellm_core_utils/get_llm_provider_logic.py@@@ -349,17 -349,12 +349,15 @@@ def get_llm_providerelif endpoint == "https://api.meta.ai/v1":custom_llm_provider = "meta"dynamic_api_key = get_secret_str("META_API_KEY")+ elif endpoint == "https://api.scx.ai/v1":+ custom_llm_provider = "scx-ai"+ dynamic_api_key = get_secret_str("SCX_API_KEY")if api_base is not None and not isinstance(api_base, str):- raise Exception("api base needs to be a string. api_base={}".format(api_base))+ raise Exception(f"api base needs to be a string. api_base={api_base}")if dynamic_api_key is not None and not isinstance(dynamic_api_key, str):- raise Exception(- "dynamic_api_key needs to be a string. dynamic_api_key={}".format(dynamic_api_key)- )- return model, custom_llm_provider, dynamic_api_key, api_base # type: ignore+ raise Exception(f"dynamic_api_key needs to be a string. dynamic_api_key={dynamic_api_key}")+ return model, custom_llm_provider, dynamic_api_key, api_base# check if model in known model provider list -> for huggingface models, raise exception as they don't have a fixed provider (can be togetherai, anyscale, baseten, runpod, et.)## openai - chatcompletion + text completion