From 8bd7e2841fb8da6ddf2e28b1665f58f1f4a8b6d4 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 19 Jul 2024 19:41:19 -0700 Subject: [PATCH 1/3] ui add tg ai --- ui/litellm-dashboard/src/components/model_dashboard.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsx index 27608f0ae48..7dea2037c8c 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx @@ -143,9 +143,11 @@ enum Providers { Anthropic = "Anthropic", Google_AI_Studio = "Google AI Studio", Bedrock = "Amazon Bedrock", - OpenAI_Compatible = "OpenAI-Compatible Endpoints (Groq, Together AI, Mistral AI, etc.)", + OpenAI_Compatible = "OpenAI-Compatible Endpoints (Groq, Mistral AI, etc.)", Vertex_AI = "Vertex AI (Anthropic, Gemini, etc.)", Databricks = "Databricks", + TogetherAI = "TogetherAI", + Groq = "Groq", Ollama = "Ollama", } @@ -158,6 +160,8 @@ const provider_map: Record = { Bedrock: "bedrock", OpenAI_Compatible: "openai", Vertex_AI: "vertex_ai", + TogetherAI: "together_ai", + Groq: "groq", Databricks: "databricks", Ollama: "ollama", @@ -1724,7 +1728,7 @@ const ModelDashboard: React.FC = ({ tooltip="Actual model name used for making litellm.completion() call." className="mb-0" > - { (selectedProvider === Providers.Azure) || (selectedProvider === Providers.OpenAI_Compatible) || (selectedProvider === Providers.Ollama) ? ( + { (selectedProvider === Providers.Azure) || (selectedProvider === Providers.OpenAI_Compatible) || (selectedProvider === Providers.Ollama) || (selectedProvider === Providers.TogetherAI) ? ( ) : providerModels.length > 0 ? ( From 3708355f916f5228574b5b42918d0843ac77c1f5 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 19 Jul 2024 19:42:04 -0700 Subject: [PATCH 2/3] router fix init openai compatible providers --- litellm/router_utils/client_initalization_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/router_utils/client_initalization_utils.py b/litellm/router_utils/client_initalization_utils.py index 073a87901ac..513457fb81b 100644 --- a/litellm/router_utils/client_initalization_utils.py +++ b/litellm/router_utils/client_initalization_utils.py @@ -79,7 +79,10 @@ def set_client(litellm_router_instance: LitellmRouter, model: dict): default_api_key = None if custom_llm_provider in litellm.openai_compatible_providers: _, custom_llm_provider, api_key, api_base = litellm.get_llm_provider( - model=model_name + model=model_name, + custom_llm_provider=custom_llm_provider, + api_key=litellm_params.get("api_key"), + api_base=litellm_params.get("api_base"), ) default_api_base = api_base default_api_key = api_key From c44cdc3f4b235b9bb7f27fd00f33da6a4b09bc46 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 20 Jul 2024 18:14:26 -0700 Subject: [PATCH 3/3] ui - support adding mistral, tg ai, perplexity, open router --- .../src/components/model_dashboard.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsx index 7dea2037c8c..904f8a9cbe2 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx @@ -137,20 +137,26 @@ interface ProviderSettings { } enum Providers { - OpenAI = "OpenAI", + Anthropic = "Anthropic", + Anyscale = "Anyscale", Azure = "Azure", Azure_AI_Studio = "Azure AI Studio", - Anthropic = "Anthropic", - Google_AI_Studio = "Google AI Studio", Bedrock = "Amazon Bedrock", - OpenAI_Compatible = "OpenAI-Compatible Endpoints (Groq, Mistral AI, etc.)", - Vertex_AI = "Vertex AI (Anthropic, Gemini, etc.)", + Codestral = "Codestral API (MistralAI)", Databricks = "Databricks", - TogetherAI = "TogetherAI", + Google_AI_Studio = "Google AI Studio", Groq = "Groq", + MistralAI = "MistralAI", Ollama = "Ollama", + OpenAI = "OpenAI", + OpenAI_Compatible = "OpenAI-Compatible Endpoints (vLLM etc.)", + OpenRouter = "OpenRouter", + PerplexityAI = "PerplexityAI", + TogetherAI = "TogetherAI", + Vertex_AI = "Vertex AI (Anthropic, Gemini, etc.)", } + const provider_map: Record = { OpenAI: "openai", Azure: "azure", @@ -161,6 +167,11 @@ const provider_map: Record = { OpenAI_Compatible: "openai", Vertex_AI: "vertex_ai", TogetherAI: "together_ai", + MistralAI: "mistral", + Codestral: "codestral", + PerplexityAI:"perplexity", + OpenRouter: "openrouter", + Anyscale: "anyscale", Groq: "groq", Databricks: "databricks", Ollama: "ollama",