fix: default_env field not display in backend editing yaml

This commit is contained in:
jialin
2026-03-02 10:21:21 +08:00
parent 76a3e5cfcf
commit cf521ad79e
3 changed files with 8 additions and 8 deletions
+1 -5
View File
@@ -145,11 +145,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
is_built_in:
data.is_built_in &&
data.backend_source === BackendSourceValueMap.BUILTIN,
..._.pick(values.built_in_version_configs?.[key], [
'image_name',
'run_command',
'entrypoint'
])
..._.pick(values.built_in_version_configs?.[key], versionFields)
}));
return {
+5 -2
View File
@@ -192,7 +192,8 @@ export const customBackendFields = [
'health_check_path',
'default_run_command',
'version_configs',
'default_backend_param'
'default_backend_param',
'default_env'
];
/**
@@ -201,7 +202,8 @@ export const customBackendFields = [
export const builtInBackendFields = [
'description',
'version_configs',
'default_backend_param'
'default_backend_param',
'default_env'
];
export const frameworks = [
@@ -278,6 +280,7 @@ export const yamlTemplate = `# ----------------------------------------
# - custom_framework:
# - required
# - choose from: ${Object.values(GPUDriverMap).join(', ')}, cpu
# - env: optional, map of env key and value
backend_name: vllm-custom
description: this is my custom vllm backend
@@ -1,5 +1,6 @@
import IconFont from '@/components/icon-font';
import { PageAction } from '@/config';
import { PageActionType } from '@/config/types';
import useBodyScroll from '@/hooks/use-body-scroll';
import { ListItem } from '../config/types';
import useCommunityBackend from './use-community-backend';
@@ -30,7 +31,7 @@ const useCreateBackend = () => {
];
const handleEditBackend = (
action: PageAction,
action: PageActionType,
title: string,
row: ListItem
) => {