19 Commits

Author SHA1 Message Date
UncleJ-h
eb992697b6 fix: remove unused heapdump dependency
The heapdump package was added in v1.1.257 but is not actually used anywhere in the codebase.

This causes build failures on platforms without Python (e.g., Zeabur) because heapdump requires node-gyp compilation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 16:43:45 +08:00
root
f535b35a1c fix(memory): use bodyStore to avoid closure capturing request body
Problem:
- Stream response handlers (res.on) captured requestOptions in closures
- requestOptions contained originalBodyString (~800KB per request)
- These strings couldn't be GC'd until stream completed
- With concurrent requests, memory accumulated rapidly

Solution:
- Store request body strings in this.bodyStore Map with unique ID
- Pass only bodyStoreId in requestOptions (not the 800KB string)
- Closures capture small ID, not large string
- Clean up bodyStore on request completion (success/error/timeout)
- Extract needed values before closures to avoid capturing body object
2026-01-12 08:31:47 +00:00
guoyongchang
09cf951cdc [feat/cron-test-support]done. 2025-12-19 10:25:43 +08:00
atoz03
ff30bfab82 feat: 账户时间线详情页与接口完善
- 后端新增 /admin/accounts/:accountId/usage-records 接口,支持按账户聚合多 Key 记录并分页筛选、汇总统计
  - 修复 API Key 时间线账户筛选跳过已删除账号,补充账户/Key 辅助解析
  - 前端新增 AccountUsageRecordsView、路由及账户列表“时间线”入口,支持模型/API Key 筛选与 CSV 导出
  - 补装 prettier-plugin-tailwindcss 并完成相关文件格式化
2025-12-05 14:23:25 +08:00
shaw
2fc84a6aca feat: 新增Droid cli支持 2025-10-09 23:05:09 +08:00
shaw
e705a3b16c fix: 补充pr-487依赖 2025-09-29 14:11:00 +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
Feng Yue
eb150b4937 feat: 实现完整用户管理系统和LDAP认证集成
- 新增LDAP认证服务支持用户登录验证
- 实现用户服务包含会话管理和权限控制
- 添加用户专用路由和API端点
- 扩展认证中间件支持用户和管理员双重身份
- 新增用户仪表板、API密钥管理和使用统计界面
- 完善前端用户管理组件和路由配置
- 支持用户自助API密钥创建和管理
- 添加管理员用户管理功能包含角色权限控制

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 11:36:45 +08:00
mouyong
8bdf495ffa feat: enhance monitoring and Gemini service functionality
- Add enhanced monitoring scripts (monitor-enhanced.sh, status-unified.sh)
- Improve Gemini relay service with better error handling and token management
- Update authentication middleware for better compatibility
- Add new package dependencies for enhanced functionality
- Update .gitignore and app configuration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-09 14:06:56 +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
1a423d3afd feat: 优化前端构建分发和模型价格更新机制
1. 前端构建分发优化:
   - 修改 GitHub Actions workflow,构建前端后推送到 web-dist 分支
   - 更新 manage.sh 安装脚本,从 web-dist 分支获取预构建文件
   - 解决部分机器无法本地编译前端的问题
   - 添加测试脚本 test-web-dist.sh 验证流程

2. 模型价格更新功能:
   - 添加手动更新模型价格脚本 update-model-pricing.js
   - 新增 npm run update:pricing 命令
   - 在 manage.sh 添加 update-pricing 命令和菜单选项
   - 支持备份、进度显示和统计信息

3. 其他改进:
   - 优化安装流程,减少对 Node.js 环境的依赖
   - 提供多种更新模型价格的方式
   - 改进错误处理和回退机制

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 10:24:03 +08:00
Alfonsxh
0fc9fab621 fix: 修复创建 API Key 时专属账号下拉框无选项的问题
问题描述:
- 创建 API Key 时,专属账号下拉框中没有显示任何账号选项
- 原因是前端代码使用了错误的过滤条件 `a.isDedicated`

解决方案:
- 将过滤条件修改为 `a.accountType === 'dedicated'`
- 后端返回的账号对象使用 `accountType` 属性(值为 'shared' 或 'dedicated')

其他修改:
- 更新 package.json 中的 build:web 和 install:web 脚本路径

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 16:16:16 +08:00
shaw
25094fe5e7 feat(pricing): 添加模型价格文件本地fallback机制 2025-07-29 22:58:44 +08:00
KevinLiao
ac1e367a69 feat: 增加每日费用限制 2025-07-27 14:47:59 +08:00
KevinLiao
f614d54ab5 fix: APIKey列表费用及Token显示不准确的问题,目前显示总数
feat: 增加APIKey过期设置,以及到期续期的能力
2025-07-25 09:53:16 +08:00
shaw
48f11b4adf feat: 添加 service:logs:follow 命令用于实时查看日志 2025-07-24 14:03:50 +08:00
shaw
38c1fc4785 feat: 添加多模型支持和OpenAI兼容接口
- 新增 Gemini 模型支持和账户管理功能
- 实现 OpenAI 格式到 Claude/Gemini 的请求转换
- 添加自动 token 刷新服务,支持提前刷新策略
- 增强 Web 管理界面,支持 Gemini 账户管理
- 优化 token 显示,添加掩码功能
- 完善日志记录和错误处理

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 10:17:39 +08:00
shaw
b1ca3f307e first commit 2025-07-14 18:14:13 +08:00