fix: custom backend and versions ux

This commit is contained in:
jialin
2025-11-04 13:37:53 +08:00
parent 9be465a8cf
commit 23b7936924
19 changed files with 247 additions and 104 deletions
+8 -3
View File
@@ -16,7 +16,7 @@ import {
import { backendOptionsMap } from '../config/backend-parameters';
import { FormContext } from '../config/form-context';
import {
BackendOption,
BackendGroupOption,
DeployFormKey,
FormData,
SourceType
@@ -188,7 +188,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
};
};
const updateKVCacheConfig = (backend: string, option: BackendOption) => {
const updateKVCacheConfig = (backend: string, option: BackendGroupOption) => {
if (
!option.isBuiltIn &&
[backendOptionsMap.SGLang, backendOptionsMap.vllm].includes(backend)
@@ -202,7 +202,12 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
return {};
};
const handleBackendChange = async (val: string, option: BackendOption) => {
const handleBackendChange = async (
val: string,
option: BackendGroupOption
) => {
console.log('handleBackendChange option===>', val, option);
const isGGUF = checkIsGGUF();
form.setFieldsValue({
env: null,
backend_version: option.default_version || '',