feat: 前端沙盒模型列表仅显示国内已备案模型
- models.ts 移除 GPT/Claude/Gemini/Llama,仅保留 domestic 模型 - DEFAULT_MODEL 改为 deepseek-v4-flash(原为 general) - ModelSelector 改为从 /sandbox/models 获取可用模型列表 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -15,15 +15,15 @@ export function ModelSelector({ value, onChange, className = '' }: ModelSelector
|
||||
const [models, setModels] = useState<ModelOption[]>(FALLBACK_MODELS);
|
||||
|
||||
useEffect(() => {
|
||||
fetch(`${API_BASE}/public/models`)
|
||||
fetch(`${API_BASE}/sandbox/models`)
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (data.items?.length) {
|
||||
setModels(data.items.map((m: any) => ({
|
||||
id: m.id,
|
||||
label: m.name,
|
||||
label: m.label,
|
||||
provider: m.provider,
|
||||
desc: m.description || '',
|
||||
desc: m.desc,
|
||||
})));
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user