mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
feat(ui): add team-visible containers toggle to team settings
Dedicated Switch on the team settings page that writes metadata.container_visibility (team|private) instead of requiring a raw JSON metadata edit. The backend reads this from team_metadata at container-create time.
This commit is contained in:
parent
00875ccd03
commit
8772ea3b25
1 changed files with 18 additions and 0 deletions
|
|
@ -531,6 +531,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({
|
|||
opted_out_global_guardrails: optedOutGlobalGuardrails,
|
||||
...(values.logging_settings?.length > 0 ? { logging: values.logging_settings } : {}),
|
||||
disable_global_guardrails: killSwitchOnAtSave,
|
||||
container_visibility: values.container_visibility ? "team" : "private",
|
||||
soft_budget_alerting_emails:
|
||||
typeof values.soft_budget_alerting_emails === "string"
|
||||
? values.soft_budget_alerting_emails
|
||||
|
|
@ -955,6 +956,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({
|
|||
guardrails: effectiveGuardrails,
|
||||
policies: info.policies || [],
|
||||
disable_global_guardrails: info.metadata?.disable_global_guardrails || false,
|
||||
container_visibility: info.metadata?.container_visibility === "team",
|
||||
soft_budget_alerting_emails: Array.isArray(info.metadata?.soft_budget_alerting_emails)
|
||||
? info.metadata.soft_budget_alerting_emails.join(", ")
|
||||
: "",
|
||||
|
|
@ -967,6 +969,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({
|
|||
model_tpm_limit,
|
||||
model_rpm_limit,
|
||||
allowed_passthrough_routes,
|
||||
container_visibility,
|
||||
...rest
|
||||
}) => rest)(info.metadata),
|
||||
null,
|
||||
|
|
@ -1463,6 +1466,21 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({
|
|||
/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={
|
||||
<span>
|
||||
Team-visible code interpreter containers{" "}
|
||||
<Tooltip title="When on, code-interpreter containers created by any team member are accessible to the whole team, including the team's service-account keys. When off, each container stays private to its creator.">
|
||||
<InfoCircleOutlined style={{ marginLeft: "4px" }} />
|
||||
</Tooltip>
|
||||
</span>
|
||||
}
|
||||
name="container_visibility"
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch checkedChildren="Team" unCheckedChildren="Private" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="Metadata" name="metadata">
|
||||
<Input.TextArea rows={10} />
|
||||
</Form.Item>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue