shaw
2fc84a6aca
feat: 新增Droid cli支持
2025-10-09 23:05:09 +08:00
iaineng
e88f07ca92
feat(ui): add OAuth usage display alongside Setup Token
...
Add OAuth usage visualization for Claude OAuth accounts while maintaining
existing Setup Token session window display. Accounts show different UI
based on authorization type detected via scopes.
Changes:
- Add loadClaudeUsage() for async OAuth usage data loading
- Add isClaudeOAuth() to detect auth type (checks user:profile + user:inference scopes)
- Add OAuth helpers: formatClaudeUsagePercent, getClaudeUsageWidth,
getClaudeUsageBarClass, formatClaudeRemaining
- Display three OAuth windows (5h, 7d, 7d-Opus) for OAuth accounts
- Maintain original session window display for Setup Token accounts
- Color-coded progress bars (blue < 60%, yellow 60-90%, red >= 90%)
- Update tooltip with OAuth documentation
- Remove duplicate Claude fallback branch
- Apply to desktop and mobile views
2025-09-30 22:52:08 +08:00
shaw
fcf54565ec
chore: 其他文件修改
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-30 11:25:43 +08:00
shaw
aca2b1cccb
feat: 账号列表支持批量删除
2025-09-28 21:43:57 +08:00
shaw
a12e076413
fix: 修复账号筛选平台是oai显示异常
2025-09-28 11:47:05 +08:00
shaw
ea28222c71
feat: 支持账号维度的数据统计
2025-09-27 22:55:06 +08:00
shaw
5e730db7f9
fix: Google icon问题修复
2025-09-27 20:02:55 +08:00
shaw
89829d7e57
feat: 账户管理增加分页和搜索
2025-09-27 17:26:49 +08:00
shaw
c142cbf9ea
style: oai会话窗口样式优化
2025-09-26 17:16:22 +08:00
shaw
fe3d94648d
fix: 优化codex使用量样式
2025-09-25 17:50:29 +08:00
shaw
4ceaa80cbe
feat: 适配codex用量数据-前端格式问题
2025-09-25 17:28:45 +08:00
shaw
c15ef0b6ae
feat: 适配codex用量数据
2025-09-25 17:23:52 +08:00
shaw
0ba048aced
feat: 优化专属账号删除逻辑
2025-09-23 15:48:38 +08:00
shaw
158a9b9a31
feat: 优化API Key批量创建和账户限流状态显示
...
- 添加 bedrockAccountId 和 rateLimitCost 字段到批量创建 API Key 功能
- 格式化 claudeAccountService 中的日志输出
- 改进账户视图中会话进度条样式,限流状态显示红色
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-14 11:59:09 +08:00
shaw
9c4dc714f8
Revert "Merge pull request #424 from Wangnov/feat/i18n"
...
This reverts commit 1d915d8327 , reversing
changes made to 009f7c84f6 .
2025-09-12 09:21:53 +08:00
Wangnov
97b94eeff9
feat: 完成web/admin-spa/src/components/apikeys的国际化并修复语法错误和警告
2025-09-12 00:03:05 +08:00
Wangnov
27c0804219
feat: 完成AccountsView页面完整国际化
...
- 添加useI18n导入并替换100+硬编码中文文本
- 扩展三种语言文件的accounts翻译键(150+条)
- 更新下拉选项为响应式计算属性支持动态翻译
- 国际化页面标题、表格列头、筛选器和操作按钮
- 处理状态文本、错误消息和工具提示
- 更新JavaScript函数返回值使用翻译键
- 完整支持桌面端和移动端视图的国际化
- 修正货币符号和时间格式化的参数化翻译
涵盖组件:
- 账户管理主界面(标题、描述、筛选器)
- 桌面端表格视图(列头、状态、操作按钮)
- 移动端卡片视图(标签、按钮、状态)
- 错误处理和确认对话框
- 时间和数值格式化函数
2025-09-12 00:03:02 +08:00
shaw
02989a7588
fix: 修复CCR账户表单验证和平台分组逻辑
...
- 修复CCR账户创建时的表单字段验证
- 统一CCR与Claude Console的处理逻辑
- 修复账户删除前的API Key绑定检查
- 修复Claude Console账户绑定的API Key计数
- 优化平台分组判断逻辑
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-11 11:54:27 +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
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
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
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
shaw
399e6b9d8c
fix: 优化codex 429限流显示为恩替
2025-09-08 16:34:26 +08:00
Gemini Wen
0a43bb2645
format: optimized front-end code format
2025-09-08 12:39:42 +08:00
shaw
e824858d60
feat: claude账户支持使用统一的客户端标识
2025-09-08 11:35:44 +08:00
sususu
4cc937a144
feat(Claude Console): 添加Claude Console账号每日配额
...
1. 额度检查优先级更高:即使不启用限流机制,超额仍会禁用账户
2. 状态会被覆盖:quota_exceeded 会覆盖 rate_limited
3. 两种恢复时间:
- 限流恢复:分钟级(如60分钟)
- 额度恢复:天级(第二天重置)
4. 独立控制:
- rateLimitDuration = 0:只管理额度,忽略429
- rateLimitDuration > 0:同时管理限流和额度
2025-09-05 14:58:59 +08:00
sczheng189
b2e7d686fe
Fix:前端显示临时异常状态
2025-09-04 14:08:55 +08:00
sczheng189
9c7ec8758d
resolve: 解决与upstream/dev的合并冲突
...
- 合并admin.js中的groupIds和autoStopOnWarning参数
- 统一AccountForm.vue中的错误提示文案和平台判断逻辑
- 保留AccountsView.vue中的分组过滤和ungrouped功能
- 确保Azure OpenAI账户创建和更新逻辑完整性
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-02 20:32:42 +08:00
sczheng189
37e6c14eac
feat: 完善账户多分组功能和Azure OpenAI支持
...
主要功能:
- 实现账户多分组调度功能完整支持
- 修复Azure OpenAI账户优先级显示问题(前端条件判断缺失)
- 修复未分组筛选功能失效(API参数处理)
- 修复Azure OpenAI账户创建错误调用Gemini API的问题
- 完善各平台分组信息支持和使用统计显示
- 统一删除账户时的分组清理逻辑
- 添加前端请求参数处理支持
技术改进:
- 前端支持多平台账户请求构造
- 后端统一groupInfos返回格式
- API客户端完善查询参数处理
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-02 20:16:20 +08:00
shaw
1a9746c84d
feat: LDAP适配深色模式
2025-09-02 14:43:30 +08:00
Wesley Liddick
d0eef7e98e
Merge pull request #314 from sczheng189/feat/5xx-error-circuit-breaker
...
feat: 改进5xx错误熔断机制和重置状态功能
2025-09-02 09:32:08 +08:00
sczheng189
f2c2bdf6d6
feat: 改进5xx错误熔断机制和重置状态功能
...
## 熔断机制优化
- 将5xx错误阈值从3次提升到10次,减少误触发
- 缩短临时错误恢复时间从60分钟到5分钟
- 支持所有5xx状态码(500-599)的统一处理
## 重置状态功能完善
后端 resetAccountStatus 新增清除:
- tempErrorAt 字段 (temp_error状态)
- sessionWindowStart/sessionWindowEnd 字段
- 5xx_errors Redis计数键
前端优化:
- 重置成功后强制刷新 loadAccounts(true)
- 避免缓存导致的状态显示不一致
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-01 21:39:39 +08:00
shaw
5cfa3cc72f
feat: 添加精确的账户费用计算和时区支持
...
- 实现基于模型使用量的精确每日费用计算
- 添加 dateHelper 工具支持时区转换
- 移除未使用的 webhook 配置代码
- 清理环境变量和配置文件中的 webhook 相关设置
- 优化前端费用显示,使用后端精确计算的数据
- 添加 DEBUG_HTTP_TRAFFIC 调试选项支持
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-01 11:29:16 +08:00
shaw
e84c6a5555
feat: 实现基于费用的速率限制功能
...
- 新增 rateLimitCost 字段,支持按费用进行速率限制
- 新增 weeklyOpusCostLimit 字段,支持 Opus 模型周费用限制
- 优化速率限制逻辑,支持费用、请求数、token多维度控制
- 更新前端界面,添加费用限制配置选项
- 增强账户管理功能,支持费用统计和限制
- 改进 Redis 数据模型,支持费用计数器
- 优化价格计算服务,支持更精确的成本核算
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-31 17:27:37 +08:00
sczheng189
e69ab2161d
feat: 实现账户多分组调度功能
...
- 添加账户分组管理功能,支持创建、编辑、删除分组
- 实现基于分组的账户调度逻辑
- 添加分组权重和优先级支持
- 提供测试脚本验证多分组调度功能
- 修复代码格式化问题(统一使用LF换行符)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-25 20:11:18 +08:00
shaw
74bcb99142
feat: 新增支持Azure OpenAI账户
2025-08-23 10:30:29 +08:00
shaw
d2f0ac37a9
feat: 支持Dark Mode
2025-08-22 22:09:38 +08:00
shaw
78f2cf1f56
fix: 修复前端 Prettier 格式化错误
...
- 移除 AccountsView.vue 中多余的空行
- 确保代码格式符合 Prettier 规范
- 前端现在可以正常编译
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-15 17:07:35 +08:00
shaw
812e98355f
feat: 实现 OpenAI token 自动刷新功能并优化账户管理界面
...
主要更改:
1. OpenAI Token 自动刷新
- 实现 refreshAccessToken 函数,支持 OAuth 2.0 refresh_token grant type
- 使用 Codex CLI 官方 CLIENT_ID (app_EMoamEEZ73f0CkXaXp7hrann)
- 支持 SOCKS5 和 HTTP/HTTPS 代理
- 自动更新 access token、id token 和 refresh token
2. 账户管理界面优化
- 移除手动刷新 token 按钮(桌面端和移动端)
- 保留后端自动刷新机制
- 优化代码结构,删除不再需要的函数和变量
3. 测试和文档
- 添加 test-openai-refresh.js 测试脚本
- 创建详细的实现文档
技术细节:
- Token 端点: https://auth.openai.com/oauth/token
- 默认有效期: 1小时
- 加密存储: AES-256-CBC
所有平台现在都支持自动 token 刷新:
✅ Claude - OAuth 自动刷新
✅ Gemini - Google OAuth2 自动刷新
✅ OpenAI - OAuth 自动刷新(新实现)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-15 16:56:44 +08:00
KevinLiao
0e5f4e03c1
feat: 新增Claude账号订阅类型设置
...
1. OAuth可自动判断订阅类型,Setup Token请自行选择。无论那种类型都可以自己改
2. 优化调度,Pro账号不再接受opus模型请求的调度
2025-08-14 16:43:58 +08:00
shaw
b3cba9e091
feat: 完善API Keys页面多平台账户绑定信息展示
...
- 支持显示Claude、Gemini和OpenAI三个平台的账户绑定信息
- 添加账户状态提醒(不存在、专属、分组、共享池)
- 优化UI设计,使用彩色标签区分不同平台
- 改进响应式布局,适配移动端和平板设备
- 修复OpenAI账户绑定数量统计问题
- 修复删除账户时OpenAI绑定检查逻辑
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-12 15:01:56 +08:00
shaw
f462684f97
feat: 实现OpenAI账户管理和统一调度系统
...
- 新增 OpenAI 账户管理服务,支持多账户轮询和负载均衡
- 实现统一的 OpenAI API 调度器,智能选择最优账户
- 优化成本计算器,支持更精确的 token 计算
- 更新模型定价数据,包含最新的 OpenAI 模型价格
- 增强 API Key 管理,支持更灵活的配额控制
- 改进管理界面,添加教程视图和账户分组管理
- 优化限流配置组件,提供更直观的用户体验
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-11 13:58:43 +08:00
千羽
11fc856999
chore: commit all changes
2025-08-10 17:46:31 +09:00
mouyong
4bcd2878f2
feat: 增强账户管理页面的平台筛选和缓存优化功能
...
- 添加平台筛选功能到账户管理页面
* 后端:在所有账户接口中支持platform和groupId查询参数
* 前端:添加平台筛选下拉框,支持条件性API请求
- 使用智能缓存机制优化数据加载
* 缓存API Keys、账户分组和分组成员数据
* 通过Ctrl/⌘+点击刷新按钮实现强制重新加载
* 在数据变更时自动清除相关缓存(创建/编辑/删除)
- 改进Gemini账户限流状态显示
* 在geminiAccountService中添加限流信息支持
* 统一所有平台的限流状态格式
* 修复仪表板统计,排除被限流的账户
- 提升用户界面体验
* 将原生title提示替换为Element Plus的el-tooltip组件
* 支持跨平台键盘快捷键(Ctrl/⌘+点击)
* ESLint规范合规和代码格式化改进
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-10 12:40:24 +08:00
shaw
7e1a9daa6b
feat: 完善管理界面功能和用户体验
...
- 添加 API Key 窗口倒计时组件 (WindowCountdown)
- 添加自定义下拉菜单组件 (CustomDropdown)
- 优化账户和 API Key 管理界面交互
- 改进教程页面布局和说明文字
- 完善账户状态显示和错误处理
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-08 14:14:46 +08:00
shaw
31bdb4aa8c
feat: add comprehensive 401 error handling and account status management
...
- Add 401 error detection and automatic account suspension after 3 consecutive failures
- Implement account status reset functionality for clearing all error states
- Enhance admin interface with status reset controls and improved status display
- Upgrade service management script with backup protection and retry mechanisms
- Add mandatory code formatting requirements using Prettier
- Improve account selector with detailed status information and color coding
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-08 00:35:26 +08:00
千羽
8a74bf5afe
refactor: standardize code formatting and linting configuration
...
- Replace .eslintrc.js with .eslintrc.cjs for better ES module compatibility
- Add .prettierrc configuration for consistent code formatting
- Update package.json with new lint and format scripts
- Add nodemon.json for development hot reloading configuration
- Standardize code formatting across all JavaScript and Vue files
- Update web admin SPA with improved linting rules and formatting
- Add prettier configuration to web admin SPA
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-07 18:19:31 +09:00
andersonby
9a9a82c86f
feat: Add comprehensive Amazon Bedrock integration support
...
Add complete Amazon Bedrock integration to Claude Relay Service with:
## Core Features
- ✅ Bedrock account management with encrypted AWS credential storage
- ✅ Full request routing to AWS Bedrock with streaming support
- ✅ Integration with unified Claude scheduler system
- ✅ Support for Inference Profiles and Application Inference Profiles
- ✅ Configurable default and small-fast model settings
## Backend Services
- Add bedrockAccountService.js for account management
- Add bedrockRelayService.js for request forwarding
- Integrate Bedrock accounts into unifiedClaudeScheduler.js
- Update admin and API routes to support Bedrock endpoints
- Add comprehensive configuration options to config.example.js
## Frontend Integration
- Complete Vue.js Web UI for Bedrock account management
- Account creation form with AWS credentials and model configuration
- Real-time account status monitoring and statistics
- Edit/update capabilities for existing accounts
## CLI Support
- Interactive CLI commands for Bedrock account operations
- Account creation, listing, updating, and testing
- Status monitoring and connection validation
## Security & Performance
- AES encrypted storage of AWS credentials in Redis
- Support for temporary credentials (session tokens)
- Region-specific configuration support
- Rate limiting and error handling
This integration enables the relay service to support three AI platforms:
1. Claude (OAuth) - Original Claude.ai integration
2. Gemini - Google AI integration
3. Amazon Bedrock - New AWS Bedrock integration
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-06 17:41:16 +08:00
shaw
ef4f7483d3
feat: 完善 Gemini 功能与 Claude 保持一致
...
- 添加 Gemini 账户的 schedulable 字段和调度开关 API
- 实现 Gemini 调度器的模型过滤功能
- 完善 Gemini 数据统计,记录 token 使用量
- 修复 Gemini 流式响应的 SSE 解析和 AbortController 支持
- 在教程页面和 README 中添加 Gemini CLI 环境变量说明
- 修复前端 Gemini 账户调度开关限制
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-04 16:53:11 +08:00
shaw
be98d5c498
fix: 修复账户管理页面移动端布局数据显示问题
...
- 修复移动端数据路径不一致问题(usage.dailyRequests -> usage.daily.requests)
- 增强移动端会话窗口显示,添加进度百分比、时间窗口和剩余时间
- 改进会话窗口UI,使用卡片样式更清晰展示信息
- 检查确认API Keys页面无类似问题
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-04 12:48:15 +08:00