forked from phoenix/litellm-mirror
ui - support all-models alias
This commit is contained in:
parent
73ef4780f7
commit
dfc020ca5f
3 changed files with 8 additions and 11 deletions
|
@ -142,9 +142,6 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
||||||
placeholder="Select models"
|
placeholder="Select models"
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
<Option key="all-models" value="all-models">
|
|
||||||
All Models
|
|
||||||
</Option>
|
|
||||||
{team && team.models ? (
|
{team && team.models ? (
|
||||||
team.models.map((model: string) => (
|
team.models.map((model: string) => (
|
||||||
<Option key={model} value={model}>
|
<Option key={model} value={model}>
|
||||||
|
|
|
@ -123,6 +123,9 @@ const Team: React.FC<TeamProps> = ({
|
||||||
placeholder="Select models"
|
placeholder="Select models"
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
|
<Select2.Option key="all-models" value="all-models">
|
||||||
|
All Models
|
||||||
|
</Select2.Option>
|
||||||
{userModels && userModels.map((model) => (
|
{userModels && userModels.map((model) => (
|
||||||
<Select2.Option key={model} value={model}>
|
<Select2.Option key={model} value={model}>
|
||||||
{model}
|
{model}
|
||||||
|
@ -360,8 +363,8 @@ const handleEditSubmit = async (formValues: Record<string, any>) => {
|
||||||
{Array.isArray(team.models) ? (
|
{Array.isArray(team.models) ? (
|
||||||
<div style={{ display: "flex", flexDirection: "column" }}>
|
<div style={{ display: "flex", flexDirection: "column" }}>
|
||||||
{team.models.length === 0 ? (
|
{team.models.length === 0 ? (
|
||||||
<Badge size={"xs"} className="mb-1" color="purple">
|
<Badge size={"xs"} className="mb-1" color="blue">
|
||||||
<Text>All Models</Text>
|
<Text>all-models</Text>
|
||||||
</Badge>
|
</Badge>
|
||||||
) : (
|
) : (
|
||||||
team.models.map((model: string, index: number) => (
|
team.models.map((model: string, index: number) => (
|
||||||
|
|
|
@ -148,9 +148,6 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
||||||
placeholder="Select models"
|
placeholder="Select models"
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
<Option key="all_models" value="all_models">
|
|
||||||
All Models
|
|
||||||
</Option>
|
|
||||||
{selectedTeam && selectedTeam.models ? (
|
{selectedTeam && selectedTeam.models ? (
|
||||||
selectedTeam.models.map((model: string) => (
|
selectedTeam.models.map((model: string) => (
|
||||||
<Option key={model} value={model}>
|
<Option key={model} value={model}>
|
||||||
|
@ -420,8 +417,8 @@ const handleEditSubmit = async (formValues: Record<string, any>) => {
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
// If selected team is None or selected team's models are empty, show all models
|
// If selected team is None or selected team's models are empty, show all models
|
||||||
<Badge size={"xs"} className="mb-1" color="purple">
|
<Badge size={"xs"} className="mb-1" color="blue">
|
||||||
<Text>All Models</Text>
|
<Text>all-models</Text>
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue