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
[UI] QA Items for adding pass through endpoints (#11909)
Ishaan Jafff6728e6e136a
diff --git a/ui/litellm-dashboard/src/components/add_pass_through.tsx b/ui/litellm-dashboard/src/components/add_pass_through.tsxindex f2e8c225312..462d5b424e7 100644--- a/ui/litellm-dashboard/src/components/add_pass_through.tsx+++ b/ui/litellm-dashboard/src/components/add_pass_through.tsx@@ -7,7 +7,6 @@import React, { useState, useEffect, useRef } from "react";import { Button, TextInput, Grid, Col, Switch } from "@tremor/react";import { Select, SelectItem, MultiSelect, MultiSelectItem, Card, Metric, Text, Title, Subtitle, Accordion, AccordionHeader, AccordionBody, } from "@tremor/react";-import { CopyToClipboard } from 'react-copy-to-clipboard';import { createPassThroughEndpoint } from "./networking";import {Button as Button2,@@ -67,6 +66,7 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({};const addPassThrough = async (formValues: Record<string, any>) => {+ console.log("addPassThrough called with:", formValues);setIsLoading(true);try {console.log(`formValues: ${JSON.stringify(formValues)}`);@@ -143,7 +143,11 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({onFinish={addPassThrough}layout="vertical"className="space-y-6"- initialValues={{ include_subpath: true }}+ initialValues={{+ include_subpath: true,+ path: pathValue,+ target: targetValue+ }}>{/* Route Configuration Section */}<Card className="p-5">@@ -154,26 +158,24 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({<Form.Itemlabel={<span className="text-sm font-medium text-gray-700">- Path Prefix <span className="text-red-500">*</span>+ Path Prefix</span>}name="path"rules={[- { required: true, message: '' },- { pattern: /^\//, message: '' }+ { required: true, message: 'Path is required', pattern: /^\// }]}extra={<div className="text-xs text-gray-500 mt-1">- Example: /bria, /openai, /anthropic+ Example: /bria, /adobe-photoshop, /elasticsearch</div>}className="mb-4"><div className="flex items-center">- <span className="mr-2 text-gray-500 font-mono text-base">/</span><TextInputplaceholder="bria"- value={pathValue.startsWith('/') ? pathValue.slice(1) : pathValue}+ value={pathValue}onChange={(e) => handlePathChange(e.target.value)}className="flex-1"/>@@ -183,17 +185,17 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({<Form.Itemlabel={<span className="text-sm font-medium text-gray-700">- Target URL <span className="text-red-500">*</span>+ Target URL</span>}name="target"rules={[- { required: true, message: '' },- { type: 'url', message: '' }+ { required: true, message: 'Target URL is required' },+ { type: 'url', message: 'Please enter a valid URL' }]}extra={<div className="text-xs text-gray-500 mt-1">- Example: https://api.openai.com, https://engine.prod.bria-api.com+ Example:https://engine.prod.bria-api.com</div>}className="mb-4"@@ -201,7 +203,10 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({<TextInputplaceholder="https://engine.prod.bria-api.com"value={targetValue}- onChange={(e) => setTargetValue(e.target.value)}+ onChange={(e) => {+ setTargetValue(e.target.value);+ form.setFieldsValue({ target: e.target.value });+ }}/></Form.Item>@@ -300,6 +305,10 @@ const AddPassThroughEndpoint: React.FC<AddFallbacksProps> = ({<Buttonvariant="primary"loading={isLoading}+ onClick={() => {+ console.log("Submit button clicked");+ form.submit();+ }}>{isLoading ? 'Creating...' : 'Add Pass-Through Endpoint'}</Button>