github-actions[bot]
03db930354
chore: sync VERSION file with release v1.1.135 [skip ci]
2025-09-11 01:17:31 +00:00
shaw
2fcfccb2fc
Merge branch 'dev' of github.com:Wei-Shaw/claude-relay-service into dev
2025-09-10 22:46:18 +08:00
shaw
78adf82f0d
fix: 优化账户表单组件的UI和功能
...
- 将 CCR 描述从 "Claude Connector" 更正为 "Claude Code Router"
- 隐藏限流时长输入字段,统一使用默认值 60 分钟
- 为 OpenAI-Responses 平台添加分组支持
- 清理 CcrAccountForm 中的冗余标签文字
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 22:44:05 +08:00
Wesley Liddick
fe1f05fadd
Merge pull request #411 from bottotl/main
...
兼容 sider 自定义 API
2025-09-10 22:36:54 +08:00
root
cd5573ecde
Fix Prettier formatting issues
...
- Remove trailing whitespace and fix indentation in src/app.js
- Format whitespace in src/middleware/auth.js
- Fix formatting and add missing newline in src/middleware/browserFallback.js
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 09:13:51 +00:00
Wesley Liddick
fcc2f51f81
Merge pull request #407 from sususu98/dev
...
fix: 更新会话续期逻辑,调整续期阈值和TTL设置,确保统一调度会话映射按配置正确续期
2025-09-10 16:36:55 +08:00
root
4fd4dbfa51
fix: 回退401错误处理逻辑到原始版本
...
- 恢复"遇到1次401就停止调度"的原始逻辑
- 移除"记录401错误但不停用账号"的临时修改
- 修复非流式和流式请求中的401处理逻辑
- 确保401错误会立即标记账号为异常状态
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 08:20:17 +00:00
sususu98
ce8706d1b6
Merge branch 'Wei-Shaw:dev' into dev
2025-09-10 15:56:03 +08:00
sususu98
d3fcd95b94
refactor: improve readability of conditional statements
2025-09-10 15:55:34 +08:00
sususu98
433f0c5f23
fix: 更新会话续期逻辑,调整续期阈值和TTL设置,确保统一调度会话映射按配置正确续期
2025-09-10 15:53:23 +08:00
shaw
7712d5516c
merge: 合并远程 dev 分支,整合 CCR 和 OpenAI-Responses 功能
...
## 合并内容
- 成功合并远程 dev 分支的 CCR (Claude Connector) 功能
- 保留本地的 OpenAI-Responses 账户管理功能
- 解决所有合并冲突,保留双方功能
## UI 调整
- 将 CCR 平台归类到 Claude 分组中
- 保留新的平台分组选择器设计
- 支持所有平台类型:Claude、CCR、OpenAI、OpenAI-Responses、Gemini、Azure OpenAI、Bedrock
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 15:49:52 +08:00
root
bdae9d6ceb
feat: 添加Chrome插件兜底支持,解决第三方插件401错误问题
...
• 新增browserFallback中间件,自动识别并处理Chrome插件请求
• 增强CORS支持,明确允许chrome-extension://来源
• 优化请求头过滤,移除可能触发Claude CORS检查的浏览器头信息
• 完善401错误处理逻辑,避免因临时token问题导致账号被错误停用
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 07:48:41 +00:00
shaw
08946c67ea
feat: 新增 OpenAI-Responses 账户管理功能和独立自动停止标记机制
...
## 功能新增
- 实现 OpenAI-Responses 账户服务(openaiResponsesAccountService.js)
- 支持使用账户内置 API Key 进行请求转发
- 实现每日额度管理和重置机制
- 支持代理配置和优先级设置
- 实现 OpenAI-Responses 中继服务(openaiResponsesRelayService.js)
- 处理请求转发和响应流处理
- 自动记录使用统计信息
- 支持流式和非流式响应
- 新增管理界面的 OpenAI-Responses 账户管理功能
- 完整的 CRUD 操作支持
- 实时额度监控和状态管理
- 支持手动重置限流和每日额度
## 架构改进
- 引入独立的自动停止标记机制,区分不同原因的自动停止
- rateLimitAutoStopped: 限流自动停止
- fiveHourAutoStopped: 5小时限制自动停止
- tempErrorAutoStopped: 临时错误自动停止
- quotaAutoStopped: 额度耗尽自动停止
- 修复手动修改调度状态时自动恢复的问题
- 统一清理逻辑,防止状态冲突
## 其他优化
- getAccountUsageStats 支持不同账户类型参数
- 统一调度器支持 OpenAI-Responses 账户类型
- WebHook 通知增强,支持新账户类型的事件
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 15:41:52 +08:00
Wesley Liddick
8b0e9b8d8e
Merge pull request #404 from sususu98/dev
...
feat: 添加 CCR (Claude Code Router) 账户类型支持
2025-09-10 15:22:29 +08:00
sususu98
1dd00e1463
format
2025-09-10 14:46:06 +08:00
sususu98
5938180583
Merge branch 'Wei-Shaw:dev' into dev
2025-09-10 14:40:46 +08:00
Wesley Liddick
fb6d0e7f55
Merge pull request #403 from Wei-Shaw/revert-401-main
...
Revert "合并所有新功能到Wei-Shaw仓库(排除ApiStatsView.vue)"
2025-09-10 14:40:00 +08:00
Wesley Liddick
3c5068866c
Revert "合并所有新功能到Wei-Shaw仓库(排除ApiStatsView.vue)"
2025-09-10 14:37:52 +08:00
sususu98
c0059c68eb
Merge branch 'Wei-Shaw:dev' into dev
2025-09-10 14:22:45 +08:00
sususu98
7f9869ae20
feat: 添加 CCR (Claude Code Router) 账户类型支持
...
实现通过供应商前缀语法进行 CCR 后端路由的完整支持。
用户现在可以在 Claude Code 中使用 `/model ccr,model_name` 将请求路由到 CCR 后端。
暂时没有实现`/v1/messages/count_tokens`,因为这需要在CCR后端支持。
CCR类型的账户也暂时没有考虑模型的支持情况
## 核心实现
### 供应商前缀路由
- 添加 modelHelper 工具用于解析模型名称中的 `ccr,` 供应商前缀
- 检测到前缀时自动路由到 CCR 账户池
- 转发到 CCR 后端前移除供应商前缀
### 账户管理
- 创建 ccrAccountService 实现 CCR 账户的完整 CRUD 操作
- 支持账户属性:名称、API URL、API Key、代理、优先级、配额
- 实现账户状态:active、rate_limited、unauthorized、overloaded
- 支持模型映射和支持模型配置
### 请求转发
- 实现 ccrRelayService 处理 CCR 后端通信
- 支持流式和非流式请求
- 从 SSE 流中解析和捕获使用数据
- 支持 Bearer 和 x-api-key 两种认证格式
### 统一调度
- 将 CCR 账户集成到 unifiedClaudeScheduler
- 添加 \_selectCcrAccount 方法用于 CCR 特定账户选择
- 支持 CCR 账户的会话粘性
- 防止跨类型会话映射(CCR 会话仅用于 CCR 请求)
### 错误处理
- 实现全面的错误状态管理
- 处理 401(未授权)、429(速率限制)、529(过载)错误
- 成功请求后自动从错误状态恢复
- 支持可配置的速率限制持续时间
### Web 管理界面
- 添加 CcrAccountForm 组件用于创建/编辑 CCR 账户
- 将 CCR 账户集成到 AccountsView 中,提供完整管理功能
- 支持账户切换、重置和使用统计
- 在界面中显示账户状态和错误信息
### API 端点
- POST /admin/ccr-accounts - 创建 CCR 账户
- GET /admin/ccr-accounts - 列出所有 CCR 账户
- PUT /admin/ccr-accounts/:id - 更新 CCR 账户
- DELETE /admin/ccr-accounts/:id - 删除 CCR 账户
- PUT /admin/ccr-accounts/:id/toggle - 切换账户启用状态
- PUT /admin/ccr-accounts/:id/toggle-schedulable - 切换可调度状态
- POST /admin/ccr-accounts/:id/reset-usage - 重置每日使用量
- POST /admin/ccr-accounts/:id/reset-status - 重置错误状态
## 技术细节
- CCR 账户使用 'ccr' 作为 accountType 标识符
- 带有 `ccr,` 前缀的请求绕过普通账户池
- 转发到 CCR 后端前清理模型名称内的`ccr,`
- 从流式和非流式响应中捕获使用数据
- 支持缓存令牌跟踪(创建和读取)
2025-09-10 14:21:48 +08:00
Wesley Liddick
61cf1166ff
Merge pull request #401 from DuanNaiSheQu/main
...
合并所有新功能到Wei-Shaw仓库(排除ApiStatsView.vue)
2025-09-10 14:08:10 +08:00
Wesley Liddick
27fe3b6853
Merge branch 'dev' into main
2025-09-10 14:04:27 +08:00
DuanNaiSheQu
af3d688e98
合并所有新功能到Wei-Shaw仓库(排除ApiStatsView.vue)
...
✨ 新增功能:
- GPT-5 High推理级别费用追踪和限制
- API Key图标上传功能
- 优化的进度条显示组件
- 暗黑模式UI兼容
- 完整的前后端集成
🔥 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-10 13:38:27 +08:00
Wesley Liddick
1c3b74f45b
Merge pull request #389 from iaineng/dev
...
fix(ui): correct table row striping in API Keys view
2025-09-09 14:18:06 +08:00
iaineng
929852a881
fix(ui): correct table row striping in API Keys view
...
Fixed second row appearing white due to invalid Tailwind CSS class bg-gray-850.
Replaced with valid bg-gray-700/30 for odd rows and kept bg-gray-800/40 for even rows
to enhance dark mode contrast.
2025-09-09 13:52:38 +08:00
Wesley Liddick
c58d8d2040
Merge pull request #387 from f3n9/main-um-8
...
修复用户自行创建的API Key缺少服务权限信息的问题
2025-09-09 13:37:28 +08:00
Feng Yue
4ee9e0b546
API Keys created by users have all permissions by default
2025-09-09 12:52:34 +08:00
Wesley Liddick
8064bc24b9
Merge pull request #382 from Edric-Li/feat/add-account-info-to-error-logs
...
feat: 在错误日志中添加账号信息
2025-09-09 12:26:45 +08:00
Wesley Liddick
4592773ea2
Merge pull request #381 from Edric-Li/fix/dedicated-account-schedulable-check
...
fix: 修复专属账号停止调度后仍能使用的问题
2025-09-09 12:19:41 +08:00
Wesley Liddick
da744528bc
Merge pull request #383 from Edric-Li/feature/smtp-notification
...
feat: 添加SMTP邮件通知功能
2025-09-09 12:19:26 +08:00
Wesley Liddick
d3577fae03
Merge pull request #380 from Edric-Li/feature/529-error-handling
...
feat: 为普通Claude账户添加529错误处理功能
2025-09-09 12:19:07 +08:00
Wesley Liddick
b581a618b9
Merge pull request #379 from geminiwen/dev
...
ui: improve group tags layout in AccountsView
2025-09-09 12:13:18 +08:00
Edric Li
f375f9f841
fix: 修复 ESLint 错误 - 解决未定义变量问题
...
- claudeConsoleRelayService.js: 将 account 变量声明提到更高作用域
- claudeRelayService.js: 移除 _makeClaudeStreamRequest 函数中的未定义变量引用
2025-09-09 11:10:27 +08:00
Edric Li
52820a7e49
style: 修复 Prettier 格式问题
...
- 格式化 src/app.js
- 格式化 src/services/claudeConsoleRelayService.js
- 格式化 src/services/claudeRelayService.js
2025-09-09 04:14:27 +08:00
Edric Li
5d677b4f17
fix: 优化UI文案和修复SMTP测试问题
...
- 修复SMTP平台测试按钮传递必要字段
- 添加"测试通知"类型的友好显示文本和描述
- 简化标题:"启用 Webhook 通知" → "启用通知"
2025-09-09 04:09:51 +08:00
Edric Li
268a262281
fix: 修复SMTP平台测试按钮缺少必要字段的问题
...
- 在testPlatform函数中添加SMTP平台的完整字段传递
- 确保测试时包含host, port, user, pass, to等必填字段
2025-09-09 04:02:13 +08:00
Edric Li
283362acd0
feat: 添加SMTP邮件通知功能
...
新增功能:
- 支持SMTP邮件通知平台,可通过邮件接收系统通知
- 支持配置SMTP服务器、端口、用户名、密码、发件人和收件人
- 支持TLS/SSL加密连接
- 提供美观的HTML邮件模板和纯文本备用格式
代码优化:
- 重构邮件格式化逻辑,提取buildNotificationDetails减少重复代码
- 优化前端表单验证逻辑,提取validatePlatformForm统一验证
- 清理UI中的冗余提示信息和配置项
UI改进:
- 移除SMTP配置说明文字
- 移除超时设置和忽略TLS证书验证选项
- 简化测试成功提示消息
- SMTP平台显示收件人邮箱而非URL
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-09 04:00:35 +08:00
Edric Li
756918b0ce
feat: 在错误日志中添加账号信息
...
- 在 claudeRelayService.js 的所有错误日志中添加账号名称或 ID
- 在 claudeConsoleRelayService.js 的错误日志中添加账号信息
- 便于排查 529 (过载) 和 504 (超时) 错误对应的具体账号
问题背景:
用户反馈错误日志中没有账号信息,无法定位是哪个账号出现问题,
特别是 529 和 504 错误频繁出现时难以排查。
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-09 02:45:47 +08:00
Edric Li
4c2660a2d3
fix: 修复专属账号停止调度后仍能使用的问题
...
- 在 selectAccountForApiKey 方法中为所有专属账号类型添加 schedulable 检查
- 在 _getAllAvailableAccounts 方法中为所有专属账号类型添加 schedulable 检查
- 改进日志输出,显示账号不可用的具体原因(isActive、status、schedulable 状态)
问题描述:
当 Claude Console/OAuth/Bedrock 账号设置为专属账号并停止调度(schedulable=false)后,
系统仍然会使用该账号,没有正确回退到账号池。
修复内容:
1. Claude OAuth 账号:添加 this._isSchedulable(boundAccount.schedulable) 检查
2. Claude Console 账号:添加 this._isSchedulable(boundConsoleAccount.schedulable) 检查
3. Bedrock 账号:添加 this._isSchedulable(boundBedrockAccountResult.data.schedulable) 检查
兼容性:
_isSchedulable 方法已处理向后兼容,当 schedulable 字段为 undefined/null 时默认返回 true
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-09 02:33:50 +08:00
Edric Li
908e323db0
feat: 为普通Claude账户添加529错误处理功能
...
- 添加可配置的529错误处理机制,通过CLAUDE_OVERLOAD_HANDLING_MINUTES环境变量控制
- 支持流式和非流式请求的529错误检测
- 自动标记过载账户并在指定时间后恢复
- 成功请求后自动清除过载状态
- 默认禁用,需手动配置启用(0表示禁用,>0表示过载持续分钟数)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-09 00:46:40 +08:00
Gemini Wen
97da7d44ba
ui: improve group tags layout in AccountsView
...
- Add vertical margin and flex-wrap for better multi-line display
- Remove left margin to align properly with container
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-08 22:55:56 +08:00
github-actions[bot]
ca79e08c81
chore: sync VERSION file with release v1.1.134 [skip ci]
2025-09-08 14:17:38 +00:00
Wesley Liddick
86ed5c6344
Merge pull request #377 from f3n9/dev-um-8
...
用户自助管理页面顶部增加链接,用于展示配置教程
2025-09-08 22:14:34 +08:00
shaw
6e16df0b45
fix: 进度条配色优化
2025-09-08 22:13:46 +08:00
shaw
73d3df56e5
fix: 进度条颜色显示优化
2025-09-08 21:11:16 +08:00
shaw
c4f1e7a411
fix: api-keys页面布局优化
2025-09-08 20:45:19 +08:00
Feng Yue
3f5004626a
Merge branch 'main-um-8' into dev-um-8
2025-09-08 18:53:32 +08:00
shaw
7f8fae70e6
fix: azure转发问题修复
2025-09-08 17:26:14 +08:00
Feng Yue
3239965cbe
add tutorial page for user
2025-09-08 17:03:45 +08:00
shaw
fec80a16fa
fix: 优化请求超时配置
2025-09-08 16:34:27 +08:00