Fix: Model provider bugs (#15770)

### What problem does this PR solve?

Fix: Model provider bugs

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-06-08 17:04:05 +08:00
committed by GitHub
parent 04209ffccf
commit 2bd8900638
3 changed files with 11 additions and 11 deletions

View File

@@ -104,7 +104,7 @@ export function ToggleList<V = unknown>({
className,
btnText,
options,
closeOnOutsideClick = true,
closeOnOutsideClick = false,
maxHeight = 500,
listClassName,
itemClassName,

View File

@@ -14,9 +14,7 @@ import { LLMFactory } from '@/constants/llm';
* 4 model_* fields directly.
*/
export const LIST_MODEL_PROVIDERS = new Set<string>([
LLMFactory.HuggingFace,
LLMFactory.Ollama,
LLMFactory.GoogleCloud,
LLMFactory.OpenRouter,
LLMFactory.VLLM,
LLMFactory.OpenAiAPICompatible,
@@ -25,12 +23,15 @@ export const LIST_MODEL_PROVIDERS = new Set<string>([
LLMFactory.Xinference,
LLMFactory.LocalAI,
LLMFactory.BaiduYiYan,
LLMFactory.TencentCloud,
LLMFactory.XunFeiSpark,
LLMFactory.GPUStack,
LLMFactory.FishAudio,
LLMFactory.MinerU,
LLMFactory.PaddleOCR,
// LLMFactory.HuggingFace,
// LLMFactory.GoogleCloud,
// LLMFactory.TencentCloud,
// LLMFactory.XunFeiSpark,
// LLMFactory.GPUStack,
// LLMFactory.FishAudio,
// LLMFactory.MinerU,
// LLMFactory.PaddleOCR,
]);
/**

View File

@@ -128,7 +128,7 @@ const ProviderModal = ({
<ToggleList
className="w-full"
buttonClassName="self-end"
// searchable
searchable={listModelsOptions.length > 10}
btnText={hasModelNameField ? t('listModels') : 'Select an option'}
options={
hasModelNameField
@@ -142,7 +142,6 @@ const ProviderModal = ({
searchLoading={listLoading}
onOpenChange={handleListOpenChange}
maxHeight={400}
closeOnOutsideClick
/>
)}