AAEE86
fecf48e180
fix: Codex 端点 URL 使用 /responses 而非 /v1/responses
...
Codex OAuth 端点(chatgpt.com/backend-api/codex)不走标准 /v1 前缀,之前 build_provider_url() 统一使用 /v1/responses 导致 404 错误。
修改内容:
- transport.py: build_provider_url() 对 Codex URL 做特判,使用 /responses
- EndpointFormDialog.vue: placeholder 对 Codex 端点显示正确路径
- guide-config.ts: 文档说明两种路径格式
2026-02-05 09:48:37 +08:00
AAEE86
4c1ec66365
feat: OAuth 密钥编辑时显示到期时间和重新授权按钮
...
- 后端 EndpointAPIKeyResponse 新增 oauth_expires_at 字段
- 从加密的 auth_config 中解密并提取 OAuth Token 到期时间
- 前端编辑已授权的 OAuth 密钥时显示"重新授权"按钮
- 在按钮旁显示 Token 到期时间
2026-02-04 16:05:25 +08:00
AAEE86
cb4407ba49
feat: 新增 Codex 上游兼容整流器
...
- 强制 store=false
- 确保 instructions 字段存在(缺失/None -> "")
- 强制 parallel_tool_calls=true,并确保 include 包含 reasoning.encrypted_content
- 删除 Codex 会拒绝的一些字段:max_output_tokens/max_completion_tokens/max_tokens/temperature/top_p/service_tier
- 将 input[] 里 role=system 的 message 改成 developer
- 在发送上游请求前注入整流(覆盖“同格式透传”和“跨格式转换”两条链路)
2026-02-04 15:09:51 +08:00
AAEE86
8c8a431428
feat: OAuth HTTP 请求添加重试机制和增强错误日志
...
- 新增 _redact_url 函数移除 URL 敏感参数
- 新增 _format_exc_chain 函数格式化异常链
- _httpx_post 对 ConnectError/TimeoutException 增加重试(最多 2 次)
- 增强日志输出:记录代理配置、主机、异常链等调试信息
2026-02-04 12:46:51 +08:00
AAEE86
e4fdc65e52
feat: 支持固定类型 Provider OAuth 授权
...
- 新增 provider_type 字段区分自定义/预置 Provider 类型(claude_code/codex/gemini_cli/antigravity)
- 实现完整 OAuth 2.0 授权流程:start(生成授权 URL + PKCE)、complete(换取 token)、refresh
- 前端 KeyFormDialog 添加 OAuth 授权 UI,支持开始授权、粘贴回调 URL、完成授权、强制刷新
- 请求时自动检测 token 过期并刷新(120s 预留窗口 + Redis 分布式锁防并发)
- 固定类型 Provider 自动创建预置端点并锁定 base_url/custom_path
- 数据库迁移:添加 providers.provider_type,扩展 api_key 列为 TEXT
- 可选依赖 tls-client 用于 Claude token 请求的 TLS 指纹伪装
2026-02-04 10:24:25 +08:00
AAEE86
897ea2e7a4
perf: 优化 Provider 预加载和 bcrypt 密码验证性能
...
- 使用 selectinload 预加载 endpoints 避免 N+1 查询
- 将 bcrypt 密码验证移至线程池执行,避免阻塞事件循环
2026-01-30 10:55:30 +08:00
AAEE86
d0ecdcd8aa
feat: 增加签到状态识别关键词"已经签到"
2026-01-30 08:42:36 +08:00
AAEE86
24d24f6829
chore: 升级到 Python 3.14 并现代化代码
...
- 升级 Docker 基础镜像从 Python 3.12 到 3.14
- 更新 pyproject.toml 支持 Python 3.13/3.14
- 移除 Python 3.8/3.9/3.10/3.11 分类器
- 更新 black 和 mypy 配置目标版本
- 将 get_event_loop() 替换为 get_running_loop() 加上 RuntimeError 处理
- 简化 compute_cost_sync 中的 asyncio.run 使用
- Dict/List/Tuple/Set → dict/list/tuple/set (PEP 585)
- Optional[T] → T | None (PEP 604)
- Union[A, B] → A | B (PEP 604)
- 移除废弃的 typing 导入
- 移除不必要的字符串引号注解
2026-01-30 03:10:21 +08:00
AAEE86
b0b1bdf158
feat: 添加Gunicorn配置优化并改进Docker构建配置
...
- 新增 gunicorn_conf.py 配置文件,实现:
- GC冻结优化以改善Copy-on-Write内存共享
- Worker RSS内存监控日志
- 添加 --max-requests 和 --max-requests-jitter 防止内存泄漏
- 改进 Dockerfile 配置:
- 修复 Nginx 静态文件目录权限问题
- 简化 docker-compose 配置:
- 移除冗余的 PYTHONIOENCODING/LANG/LC_ALL 环境变量
2026-01-29 22:53:42 +08:00
AAEE86
c26598c773
feat(frontend): 调整统一模型表单对话框尺寸
...
- 将对话框尺寸从 3xl 增大到 4xl
- 将创建模式的内容高度从 500px 增加到 600px
- 为模型选择和配置区域提供更多展示空间
2026-01-29 17:41:12 +08:00
AAEE86
2140c1443a
fix(frontend): 修复端点配置对话框中多个 Select 下拉框同时打开的冲突问题
2026-01-29 17:16:30 +08:00
AAEE86
42aa0cbcee
fix: 链路预览只显示白名单匹配的 Endpoint 和 Key
...
修复链路预览显示不相关 Endpoint 的问题:
- 新增 is_key_model_allowed 函数检查 Key 白名单是否匹配当前 GlobalModel
- 过滤掉白名单不匹配的 Key
- 跳过没有任何匹配 Key 的 Endpoint
- 简化 active_keys 计算逻辑
2026-01-22 10:33:03 +08:00
AAEE86
c61c3147ba
feat(keys): clear allowed_models when auto_fetch_models is disabled
...
Add logic to automatically set allowed_models to null when auto_fetch_models is turned off for a key. Also include auto_fetch_models and locked_models fields in config export/import, and trigger model fetching for keys with auto_fetch_models enabled during import.
2026-01-14 20:05:52 +08:00
AAEE86
1becf39269
feat(keys): trigger immediate model fetch when auto_fetch_models is enabled
2026-01-14 18:18:31 +08:00
AAEE86
d488f809d5
feat(ui): add horizontal scrolling to request timeline
2026-01-13 19:16:08 +08:00
AAEE86
5ed3695c48
feat(ui): add inline editing for API key rate multipliers
...
Add click-to-edit functionality for rate multipliers in the provider detail drawer. Users can now click on any multiplier value to edit it inline, with support for keyboard shortcuts (Enter to save, Escape to cancel) and automatic focus management. The changes are immediately saved to the backend and reflected in the UI.
2026-01-13 18:59:53 +08:00
AAEE86
f9a8be898a
style(ui): improve text visibility in dark mode for model badges
2026-01-08 10:26:58 +08:00