mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
feat: replace raw JSON TextInput with ModelBudgetEditor in CreateTeamModal
This commit is contained in:
parent
a8bfd352a8
commit
2d11231737
2 changed files with 3 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ import MCPServerSelector from "@/components/mcp_server_management/MCPServerSelec
|
|||
import AgentSelector from "@/components/agent_management/AgentSelector";
|
||||
import PremiumLoggingSettings from "@/components/common_components/PremiumLoggingSettings";
|
||||
import ModelAliasManager from "@/components/common_components/ModelAliasManager";
|
||||
import { ModelBudgetEditor } from "@/components/OldTeams";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import NotificationsManager from "@/components/molecules/notifications_manager";
|
||||
|
|
@ -494,7 +495,7 @@ const CreateTeamModal = ({
|
|||
}
|
||||
name="team_member_model_max_budget"
|
||||
>
|
||||
<TextInput placeholder={'{"gpt-3.5-turbo": {"max_budget": 10.0}}'} />
|
||||
<ModelBudgetEditor availableModels={modelsToPick} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="Max Budget (USD)" name="max_budget">
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ interface ModelBudgetEditorProps {
|
|||
availableModels: string[];
|
||||
}
|
||||
|
||||
const ModelBudgetEditor: React.FC<ModelBudgetEditorProps> = ({ value, onChange, availableModels }) => {
|
||||
export const ModelBudgetEditor: React.FC<ModelBudgetEditorProps> = ({ value, onChange, availableModels }) => {
|
||||
const [rows, setRows] = useState<ModelBudgetRow[]>(() => {
|
||||
if (!value || Object.keys(value).length === 0) return [];
|
||||
return Object.entries(value).map(([model, cfg]) => ({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue