From 9e7bd78693115b721dbc7825fe7746b069518de1 Mon Sep 17 00:00:00 2001 From: jialin Date: Mon, 15 Jun 2026 14:37:09 +0800 Subject: [PATCH] fix: allowed models do not contain the org name --- .../api-keys/components/add-apikey-modal/allow-models.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/api-keys/components/add-apikey-modal/allow-models.tsx b/src/pages/api-keys/components/add-apikey-modal/allow-models.tsx index eeb42b2d..5f50cfab 100644 --- a/src/pages/api-keys/components/add-apikey-modal/allow-models.tsx +++ b/src/pages/api-keys/components/add-apikey-modal/allow-models.tsx @@ -1,6 +1,7 @@ import { PageAction } from '@/config'; import { PageActionType } from '@/config/types'; import { queryMyModels } from '@/pages/llmodels/apis'; +import useOpenPlayground from '@/pages/model-routes/hooks/use-open-playground'; import { SelectPanel, useAppUtils } from '@gpustack/core-ui'; import { useIntl } from '@umijs/max'; import { Checkbox, Divider, Form, Radio } from 'antd'; @@ -22,6 +23,7 @@ const AllowModelsForm: React.FC<{ onValuesChange?: (changedValues: any, allValues: any) => void; }> = ({ currentData, action, onValuesChange }) => { const intl = useIntl(); + const { generateModelName } = useOpenPlayground(); const { getRuleMessage } = useAppUtils(); const form = Form.useFormInstance(); const allowedModelNames = Form.useWatch( @@ -39,7 +41,7 @@ const AllowModelsForm: React.FC<{ const res = await queryMyModels({ page: -1 }); - const options = res.items.map((item) => item.name); + const options = res.items.map((item) => generateModelName(item)); if (action === PageAction.EDIT && currentData) { const list = new Set([ ...options,