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]

fix(ui/): add langsmith sampling rate

Krrish Dholakia2a827c515a4c
diff --git a/ui/litellm-dashboard/src/components/callback_info_helpers.tsx b/ui/litellm-dashboard/src/components/callback_info_helpers.tsx
index b615a7945e6..66ef4d87385 100644
--- a/ui/litellm-dashboard/src/components/callback_info_helpers.tsx
+++ b/ui/litellm-dashboard/src/components/callback_info_helpers.tsx
@@ -46,7 +46,7 @@ const asset_logos_folder = '/ui/assets/logos/';
interface CallbackInfo {
logo: string;
supports_key_team_logging: boolean;
- dynamic_params: Record<string, "text" | "password" | "select" | "upload">;
+ dynamic_params: Record<string, "text" | "password" | "select" | "upload" | "number">;
description: string | null;
}
@@ -86,7 +86,8 @@ export const callbackInfo: Record<string, CallbackInfo> = {
dynamic_params: {
"langsmith_api_key": "password",
"langsmith_project": "text",
- "langsmith_base_url": "text"
+ "langsmith_base_url": "text",
+ "langsmith_sampling_rate": "number"
},
description: "Langsmith Logging Integration"
},
diff --git a/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx b/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx
index c81acefebd9..f0b660d01d4 100644
--- a/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx
+++ b/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx
@@ -6,6 +6,7 @@ import { InfoCircleOutlined } from '@ant-design/icons';
import { Button, Card, TextInput } from '@tremor/react';
import { PlusIcon, TrashIcon, CogIcon, BanIcon } from '@heroicons/react/outline';
import { callbackInfo, Callbacks, callback_map, mapDisplayToInternalNames } from '../callback_info_helpers';
+import NumericalInput from '../shared/numerical_input';
const { Option } = Select;
@@ -126,13 +127,33 @@ const LoggingSettings: React.FC<LoggingSettingsProps> = ({
Sensitive
</span>
)}
+ {paramType === 'number' && (
+ <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800">
+ Number
+ </span>
+ )}
</label>
- <TextInput
- type={paramType === 'password' ? 'password' : 'text'}
- placeholder={`os.environ/${paramName.toUpperCase()}`}
- value={config.callback_vars[paramName] || ''}
- onChange={(e) => updateCallbackVar(configIndex, paramName, e.target.value)}
- />
+ {paramType === 'number' && (
+ <span className="text-xs text-gray-500">
+ Value must be between 0 and 1
+ </span>
+ )}
+ {paramType === 'number' ? (
+ <NumericalInput
+ step={0.01}
+ width={400}
+ placeholder={`os.environ/${paramName.toUpperCase()}`}
+ value={config.callback_vars[paramName] || ''}
+ onChange={(e: any) => updateCallbackVar(configIndex, paramName, e.target.value)}
+ />
+ ) : (
+ <TextInput
+ type={paramType === 'password' ? 'password' : 'text'}
+ placeholder={`os.environ/${paramName.toUpperCase()}`}
+ value={config.callback_vars[paramName] || ''}
+ onChange={(e) => updateCallbackVar(configIndex, paramName, e.target.value)}
+ />
+ )}
</div>
))}
</div>