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]

ui QA fix, adding wildcard models

Ishaan Jaff7e722225a141
diff --git a/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx b/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx
index 104663eda2d..0fa08e48af3 100644
--- a/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx
+++ b/ui/litellm-dashboard/src/components/add_model/handle_add_model_submit.tsx
@@ -11,6 +11,14 @@ export const handleAddModelSubmit = async (
) => {
try {
console.log("handling submit for formValues:", formValues);
+
+
+ // Get model mappings and safely remove from formValues
+ const modelMappings = formValues["model_mappings"] || [];
+ if ("model_mappings" in formValues) {
+ delete formValues["model_mappings"];
+ }
+
// Handle wildcard case
if (formValues["model"] && formValues["model"].includes("all-wildcard")) {
@@ -18,15 +26,13 @@ export const handleAddModelSubmit = async (
const litellm_custom_provider = provider_map[customProvider as keyof typeof Providers];
const wildcardModel = litellm_custom_provider + "/*";
formValues["model_name"] = wildcardModel;
+ modelMappings.push({
+ public_name: wildcardModel,
+ litellm_model: wildcardModel,
+ });
formValues["model"] = wildcardModel;
}
- // Get model mappings and safely remove from formValues
- const modelMappings = formValues["model_mappings"] || [];
- if ("model_mappings" in formValues) {
- delete formValues["model_mappings"];
- }
-
// Create a deployment for each mapping
for (const mapping of modelMappings) {
const litellmParamsObj: Record<string, any> = {};