shaw
77f80ef1f4
fix: claude token统计问题
2025-08-17 00:41:16 +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
shaw
7fa75df1fd
fix: 修复分组调度功能和API Keys统计弹窗UI问题
...
1. 分组调度功能修复:
- 统一使用 unifiedClaudeScheduler 和 unifiedGeminiScheduler
- 修复 schedulable 字段数据类型不一致问题(布尔值/字符串)
- 添加 _isSchedulable() 辅助方法确保兼容性
- 修复所有路由文件中的调度器调用
2. API Keys 统计弹窗UI优化:
- 统一弹窗样式与系统UI风格
- 添加右上角关闭按钮
- 修复移动端宽度问题(设置为95%屏幕宽度)
- 使用 Teleport 组件和项目通用样式
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-05 17:06:52 +08:00
leslie
53e0577e19
添加claude账号维度计算token费用前端修复
2025-07-25 21:48:54 +08:00
shaw
a431778363
fix 修复openai格式流式响应的结束标记问题
2025-07-22 18:00:24 +08:00
shaw
dabf3bf7ea
feat: 实现 Claude Code headers 动态管理功能
...
- 创建 claudeCodeHeadersService 管理各账号的 Claude Code headers
- 自动捕获成功请求的 headers 并按账号存储在 Redis
- 智能版本管理,只保留最新版本的 headers
- OpenAI 转发时根据账号动态获取对应的 headers
- 添加管理端点查看和清除各账号的 headers 信息
- 完整支持 Claude Code 必需的 beta headers
解决了 "This credential is only authorized for use with Claude Code" 错误
避免了固定版本号带来的风控问题
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-07-22 16:03:31 +08:00
shaw
b2ad2a4a61
fix: 修复 OpenAI 兼容路由的 Claude API 认证和 Function Calling 支持
...
- 添加必需的系统消息 "You are Claude Code, Anthropic's official CLI for Claude."
- 修改 anthropic-beta header 为 OAuth-only 模式 (oauth-2025-04-20)
- 不再传递客户端 headers,使用固定的 4 个必需 headers
- 增强流式响应的 Function Calling 支持,正确处理 tool_use 事件
- 支持自定义 beta header 参数,允许不同路由使用不同的认证模式
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-07-22 14:38:30 +08:00
shaw
9ad7feb94c
fix: 修复 OpenAI 路由中的 req.apiKeyData undefined 错误
...
- 将所有路由中的 req.apiKeyData 改为 req.apiKey(与中间件一致)
- 在 authenticateApiKey 中间件中添加缺失的字段(permissions, geminiAccountId, usage)
- 修复 openaiClaudeRoutes.js、openaiGeminiRoutes.js 和 geminiRoutes.js 中的引用错误
- 确保 API 权限检查正常工作
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-07-22 13:08:24 +08:00
shaw
6b0832bc2d
fix: 修复 OpenAI 兼容路由中的 router.handle() 错误
...
- 移除了 openaiClaudeRoutes.js 中错误的 router.handle() 调用
- 提取 handleChatCompletion 函数作为共享处理逻辑
- 修复了 /v1/completions 端点的实现
- 确保 /openai/claude 和 /openai/gemini 路由正常工作
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-07-22 12:58:11 +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