Commit Graph

13 Commits

Author SHA1 Message Date
iRubbish
f31f7c9385 feat: 实现历史API Key自动关联功能
核心功能:
- AD用户登录时自动关联已存在的历史API Key
- 关联规则: API Key name字段与用户displayName完全匹配
- 自动设置owner字段完成关联,避免用户重新创建Key

实现逻辑:
1. 优先匹配owner字段(已关联的Key)
2. 如无owner匹配,尝试匹配name与displayName
3. 找到匹配历史Key后,自动设置owner完成关联

技术特性:
- 详细日志记录关联过程
- 支持JWT token中完整用户信息传递
- Redis数据自动更新owner字段
- 系统迁移兼容性处理

测试验证:
- 创建测试历史Key验证自动关联
- JWT token正确解析displayName字段
- Redis数据正确更新owner关联关系

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 18:19:33 +08:00
iRubbish
7624c383e8 feat: 完整实现AD域控用户认证系统
主要功能:
- 新增LDAP服务连接AD域控服务器
- 实现多格式AD用户认证(sAMAccountName, UPN, 域\用户名, DN)
- 支持中文显示名和拼音用户名搜索
- 添加用户账户状态检查(禁用账户检测)
- 实现JWT token认证和用户会话管理

新增文件:
- src/services/ldapService.js - LDAP核心服务
- src/routes/ldapRoutes.js - AD认证API路由
- src/services/userMappingService.js - 用户映射服务
- web/admin-spa/src/views/UserDashboardView.vue - 用户控制台
- web/admin-spa/src/components/user/ - 用户组件目录

修改功能:
- ApiStatsView.vue 增加用户登录按钮和模态框
- 路由系统增加用户专用页面
- 安装ldapjs和jsonwebtoken依赖

技术特性:
- 多种认证格式自动尝试
- LDAP referral错误处理
- 详细认证日志和错误码记录
- 前后端完整用户认证流程

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 18:03:55 +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