feat: 添加硅基流动(SiliconFlow)支持和错误处理优化

## 主要更新

### 新增功能
- 新增 SiliconFlow_provider.py 专用提供商
- 添加硅基流动 API 集成文档
- 实现 Cherry Studio 风格的连接测试

### 错误处理优化
- 修复前端 Form.tsx 错误显示问题
- 改进 universal_gpt.py 异常处理逻辑
- 统一 URL 格式处理,避免路径重复

### 兼容性改进
- 优化 OpenAI 兼容提供商 URL 处理
- 增强模型列表获取的容错性
- 添加详细的调试日志

### 安全性提升
- 更新 .gitignore 保护敏感信息
- 移除示例配置文件

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yangyuguang
2025-07-13 09:53:39 +08:00
parent 880f745718
commit ab8cdc416a
15 changed files with 4962 additions and 84 deletions

3850
BillNote_frontend/bun.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -156,9 +156,10 @@ const ProviderForm = ({ isCreate = false }: { isCreate?: boolean }) => {
toast.success('测试连通性成功 🎉')
} catch (error) {
toast.error(`连接失败: ${data.data.msg || '未知错误'}`)
} catch (error: any) {
console.error('连接测试失败:', error)
const errorMsg = error?.response?.data?.msg || error?.message || '未知错误'
toast.error(`连接失败: ${errorMsg}`)
// toast.error('测试连通性异常')
} finally {
setTesting(false)

View File

@@ -64,6 +64,9 @@ const formSchema = z
ctx.addIssue({ code: 'custom', message: '本地视频路径不能为空', path: ['video_url'] })
} else if (!video_url) {
ctx.addIssue({ code: 'custom', message: '视频链接不能为空', path: ['video_url'] })
} else if (platform === 'local') {
// 对于本地文件只检查是否为空不验证URL格式
return
} else {
try {
const url = new URL(video_url)