mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
feat(ui): add Team Member Settings accordion to Create Team modal
Groups default_team_member_models, member budget/key duration, and tpm/rpm defaults into a single collapsible section. The model picker is filtered to only show the models selected for the team, and the copy distinguishes it from the team-level Models field.
This commit is contained in:
parent
ed9009347b
commit
1736f8ced7
1 changed files with 75 additions and 30 deletions
|
|
@ -408,8 +408,82 @@ const CreateTeamModal = ({
|
|||
<NumericalInput step={1} width={400} />
|
||||
</Form.Item>
|
||||
|
||||
<Accordion className="mt-8 mb-8">
|
||||
<AccordionHeader>
|
||||
<b>Team Member Settings</b>
|
||||
</AccordionHeader>
|
||||
<AccordionBody>
|
||||
<Text className="text-xs text-gray-500 mb-4">
|
||||
Optional defaults applied when members join this team. All fields can be overridden per member.
|
||||
</Text>
|
||||
<Form.Item
|
||||
noStyle
|
||||
shouldUpdate={(prev, cur) => prev.models !== cur.models}
|
||||
>
|
||||
{({ getFieldValue }) => {
|
||||
const teamModels: string[] = getFieldValue("models") || [];
|
||||
const opts = teamModels.length > 0 ? teamModels : modelsToPick;
|
||||
return (
|
||||
<Form.Item
|
||||
label={
|
||||
<span>
|
||||
Default Model Access{" "}
|
||||
<Tooltip title="Optional. If set, new members can only access these models by default. Must be a subset of the team's models. Leave empty to give all members access to all team models.">
|
||||
<InfoCircleOutlined style={{ marginLeft: "4px" }} />
|
||||
</Tooltip>
|
||||
</span>
|
||||
}
|
||||
name="default_team_member_models"
|
||||
>
|
||||
<Select2
|
||||
mode="multiple"
|
||||
placeholder="Leave empty — all team models accessible to every member"
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
{opts.map((m) => (
|
||||
<Select2.Option key={m} value={m}>
|
||||
{getModelDisplayName(m)}
|
||||
</Select2.Option>
|
||||
))}
|
||||
</Select2>
|
||||
</Form.Item>
|
||||
);
|
||||
}}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Default Member Budget (USD)"
|
||||
name="team_member_budget"
|
||||
normalize={(value) => (value ? Number(value) : undefined)}
|
||||
tooltip="Default spend budget for each member in this team."
|
||||
>
|
||||
<NumericalInput step={0.01} precision={2} width={200} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Default Key Duration (eg: 1d, 1mo)"
|
||||
name="team_member_key_duration"
|
||||
tooltip="Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)"
|
||||
>
|
||||
<TextInput placeholder="e.g., 30d" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Default RPM Limit"
|
||||
name="team_member_rpm_limit"
|
||||
tooltip="Default requests per minute limit for each member. Can be overridden per member."
|
||||
>
|
||||
<NumericalInput step={1} width={400} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Default TPM Limit"
|
||||
name="team_member_tpm_limit"
|
||||
tooltip="Default tokens per minute limit for each member. Can be overridden per member."
|
||||
>
|
||||
<NumericalInput step={1} width={400} />
|
||||
</Form.Item>
|
||||
</AccordionBody>
|
||||
</Accordion>
|
||||
|
||||
<Accordion
|
||||
className="mt-20 mb-8"
|
||||
className="mt-8 mb-8"
|
||||
onClick={() => {
|
||||
if (!mcpAccessGroupsLoaded) {
|
||||
fetchMcpAccessGroups();
|
||||
|
|
@ -432,35 +506,6 @@ const CreateTeamModal = ({
|
|||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Team Member Budget (USD)"
|
||||
name="team_member_budget"
|
||||
normalize={(value) => (value ? Number(value) : undefined)}
|
||||
tooltip="This is the individual budget for a user in the team."
|
||||
>
|
||||
<NumericalInput step={0.01} precision={2} width={200} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Team Member Key Duration (eg: 1d, 1mo)"
|
||||
name="team_member_key_duration"
|
||||
tooltip="Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)"
|
||||
>
|
||||
<TextInput placeholder="e.g., 30d" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Team Member RPM Limit"
|
||||
name="team_member_rpm_limit"
|
||||
tooltip="The RPM (Requests Per Minute) limit for individual team members"
|
||||
>
|
||||
<NumericalInput step={1} width={400} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Team Member TPM Limit"
|
||||
name="team_member_tpm_limit"
|
||||
tooltip="The TPM (Tokens Per Minute) limit for individual team members"
|
||||
>
|
||||
<NumericalInput step={1} width={400} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Metadata"
|
||||
name="metadata"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue