fix: kv cache support in builtin backend

This commit is contained in:
jialin
2025-10-27 14:13:47 +08:00
parent 6969cb0b9c
commit df65d3e2f6
15 changed files with 124 additions and 40 deletions
+15
View File
@@ -184,11 +184,26 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
};
};
const updateKVCacheConfig = (backend: string, option: BackendOption) => {
if (
!option.isBuiltIn &&
[backendOptionsMap.SGLang, backendOptionsMap.vllm].includes(backend)
) {
return {
extended_kv_cache: {
enabled: false
}
};
}
return {};
};
const handleBackendChange = async (val: string, option: BackendOption) => {
form.setFieldsValue({
env: null,
backend_version: option.default_version || '',
backend_parameters: option.default_backend_param || [],
...updateKVCacheConfig(val, option),
...updateGPUSelector(val)
});
onBackendChange?.(val);