🐳 Docker 镜像
docker pull ghcr.io/blackrion/claude-code-hub:v0.2.39
docker pull ghcr.io/blackrion/claude-code-hub:latest📦 主要更新
[unreleased]
Bug 修复
- Avoid redirect loop for non-admin dashboard
- Refresh proxy status from database
- 修复页面布局和优化使用文档页面
- 简化版本管理配置和修复类型错误
- 修复上游调度决策链稳定性并增强可观测性
- 修复 TypeScript ESLint 错误以通过 CI 构建
- 修复数据库定义不一致
- 修复供应商统计数据获取的错误处理
- 处理供应商统计数据中的 last_call_time 类型
- 增强供应商统计数据处理和日志展示
- 更新 UpdateUserSchema 以允许 providerGroup 字段为 null
- 修复 OpenAI/Codex 请求重试时错误选择 Claude 供应商的问题
- 修复 Codex 请求转发时使用原始 buffer 而非转换后 message 的问题
- 禁用 Codex CLI instructions 自动注入以修复 400 错误
- 修复 Codex 请求转换逻辑并增强错误日志
- 修复普通用户无法复制自己密钥的权限问题
- 修复 Codex 请求 User-Agent 导致连接被拒绝的问题
- 修复活跃 Session 计数逻辑不一致问题
- 修复供应商并发限制被超的竞态条件 Bug
- 修复日志设置页面被 gitignore 错误忽略的问题
- 修复多个核心系统的竞态条件和时区问题
- 修复统计查询中的时区转换错误
- 统一排行榜时间计算逻辑与首页统计保持一致
- 修正 .gitignore 格式并移除误提交的 dev 目录文件
- 禁用压缩避免 HTTP 上游触发 undici ZlibError
- 修复数据库管理页面的认证机制
- 修复数据库备份功能的架构问题
- 修复数据库导入时的角色所有权错误
- 修复模型重定向导致的费用计算为 0 的问题
- 修复决策链时间线缺失错误信息和横向滚动问题
- 排除 workflow 文件的自动提交以避免权限问题
- 排除 workflow 文件的自动提交以避免权限问题
- 调整使用日志表格中的单元格对齐方式
- 调整模型多选组件的样式以改善用户体验
- 修复所有 ESLint 警告以通过 CI/CD 构建
- 修复应用启动慢问题
- 修复 Content-Length 头不匹配导致的请求失败
- 修复 ENABLE_MULTI_PROVIDER_TYPES 环境变量无效的 Bug
- 修复 OpenAI → Codex 转换器缺失 instructions 字段导致请求失败
- 修复 Codex API 兼容性问题(instructions 校验、消息计数和 token 统计)
- 优化 Codex 请求清洗逻辑,增强日志记录
- 优化 OpenAI 到 Codex 请求转换逻辑
- Preserve Codex cache token usage
- 更新供应商选择提示信息
- Validate canLoginWebUi permission in middleware (ding113#4)
- 解决 PR 审查意见
- 修复 track_progress 导致 workflow 失败的问题
- 修复 middleware 和 API routes 的 Edge Runtime 兼容性问题
- 更新 Redis 配置以使用 Docker 服务名
- 开发环境自动初始化价格表种子文件
- Auto-initialize price table in development mode (ding113#11)
- 简化字段验证逻辑,提升用户体验 (ding113#12)
- 扩大 API 密钥的最大长度限制至 1024 个字符
- 修复 Bull Queue Redis 连接配置问题 (ding113#23)
- Prevent infinite loop by excluding bot actions in GitHub Actions workflow
- 修复用户每日限额检查失效和若干代码问题
- Auto-fix CI failures in Dev Branch CI/CD [skip ci]
- Update commit message guidelines for CI auto-fixes
- 修复 SQL 查询日期字段类型不匹配的问题
- 替换 SQL 查询中的数组匹配逻辑为 inArray 方法
- 使用时区感知的日期处理逻辑修复查询问题
- 修复用户分组过滤功能 - 补全 providerGroup 字段查询 (ding113#31)
- 修复模块加载时立即初始化导致的 unhandledRejection
- Resolve TypeScript and ESLint errors to pass CI build
- Auto-fix CI failures in PR Build Check (ding113#43)
- ding113#40 环境变量无法生效
- 优化供应商优先级字段说明文案 (ding113#45)
- Remove duplicate migration file 0013_optimal_darkhawk
- 应用 PR ding113#49 的代码审查建议
- 修复http 无法登录问题;优化部分文案 (ding113#49)
- 修复 OpenAPI 文档生产环境显示 localhost 问题 (ding113#55)
- 修复模型选择器列表下方空白问题 (ding113#56)
- 修复若干问题 (ding113#62)
- 修复 0013 迁移缺少幂等性保护导致升级失败 (ding113#65)
- 修正模型重定向方向并优化 UI 布局
- Auto-fix CI failures in PR Build Check
- 修复供应商切换死锁风险和信号处理问题
- Update GA version detection threshold from 2 to 1 user
- Escape quotes in provider-form.tsx for proper rendering
- Extract cached tokens from OpenAI Response API format for codex providers
- Correct priority sorting order in provider manager
- Change SQL aggregate functions to use double precision
- Enhance request sanitization for official Codex clients
- Adjust codex usage input tokens
- 修复在 Turbopack 环境下的 Pino 日志实例创建逻辑
- 修复供应商每日用量统计 SQL 查询错误
- 修复 allowGlobalUsageView 权限控制失效问题
- 修复用户管理系统的日期清除和权限控制漏洞
- Use TZ-aware date formatting for cache keys (daily/monthly) via date-fns-tz and env TZ
- 防止私有参数泄露到上游供应商
- Align active sessions panel height with metric cards
- Improve locale type handling and update link components
- Auto-fix CI failures in Non-Main Branch CI/CD
- Auto-fix CI failures in PR Build Check
- Replace hardcoded Chinese strings in users.ts with translation keys
- Correct translation key mismatch in settings navigation
- Correct JSON syntax error in provider-form-temp.json
- Correct JSON syntax in provider-form-temp.json - escape quotes in description field
- Update error logging messages in user actions for consistency and clarity
- Add missing provider-chain translation keys for all locales
- Register provider-chain namespace in all locale index files
- Add errorCode to all error returns and fix hardcoded locale
- Auto-fix CI failures in PR Build Check
- Restructure data.guide translations to nested format
- Replace empty string with 'all' value in endpoint filter SelectItem
- Correct provider types translation namespace
- Add new thinking format error pattern
- Finalize aborted proxy streams
代码格式
- 更新登录页和文档页布局
- 优化登录页按钮布局
代码重构
- 使用 React Query 优化统计数据管理
- 消除代理转发中的冗余防御性检查
- 简化系统并扩展模型支持范围
- 优化 Docker 数据持久化和增强调试能力
- 移除代码中的 emoji 并增强错误追踪
- Improve cost calculation logic in calculateRequestCost function
- 统一日志系统并引入 Pino 日志库
- 优化任务队列和消息模板构造逻辑
- Extract quota pages into modular components
- Improve provider selection retry logic
- Streamline usage metrics parsing in ProxyResponseHandler
- Enhance error handling for client input errors in Proxy
- Remove unused dashboard components and settings files
- Replace hardcoded navigation items with translated items in settings layout
- Remove unused blockedByLabels from error-details-dialog and update unknown provider name handling in usage-logs-table
其他变更
- Update .gitignore to include .specify directory
- 添加本地开发 Docker Compose 配置
- Sync VERSION file with release v0.1.1 [skip ci]
- 更新 Docker 配置和镜像源
- Sync VERSION file with release v0.1.2 [skip ci]
- 添加 Redis 服务到 Docker Compose 配置
- Sync VERSION file with release v0.1.3 [skip ci]
- 更新仓库地址并添加原项目致谢
- Sync VERSION file with release v0.1.4 [skip ci]
- Sync VERSION file with release v0.1.5 [skip ci]
- Sync VERSION file with release v0.1.6 [skip ci]
- Sync VERSION file with release v0.1.7 [skip ci]
- Sync VERSION file with release v0.1.8 [skip ci]
- Sync VERSION file with release v0.1.9 [skip ci]
- Sync VERSION file with release v0.1.10 [skip ci]
- Sync VERSION file with release v0.1.11 [skip ci]
- 更新 Docker 配置和文档以优化数据持久化
- Sync VERSION file with release v0.1.12 [skip ci]
- Sync VERSION file with release v0.1.13 [skip ci]
- Sync VERSION file with release v0.1.14 [skip ci]
- Sync VERSION file with release v0.1.15 [skip ci]
- Sync VERSION file with release v0.1.16 [skip ci]
- Sync VERSION file with release v0.1.17 [skip ci]
- Sync VERSION file with release v0.1.18 [skip ci]
- Sync VERSION file with release v0.1.19 [skip ci]
- 修复容器时区
- Sync VERSION file with release v0.1.20 [skip ci]
- Sync VERSION file with release v0.1.21 [skip ci]
- Sync VERSION file with release v0.1.22 [skip ci]
- Sync VERSION file with release v0.1.23 [skip ci]
- Sync VERSION file with release v0.1.24 [skip ci]
- Sync VERSION file with release v0.1.25 [skip ci]
- Sync VERSION file with release v0.1.25 [skip ci]
- Sync VERSION file with release v0.1.26 [skip ci]
- Sync VERSION file with release v0.1.27 [skip ci]
- Sync VERSION file with release v0.1.28 [skip ci]
- Sync VERSION file with release v0.1.29 [skip ci]
- Sync VERSION file with release v0.1.30 [skip ci]
- Sync VERSION file with release v0.1.31 [skip ci]
- Sync VERSION file with release v0.1.32 [skip ci]
- Sync VERSION file with release v0.1.33 [skip ci]
- Sync VERSION file with release v0.1.34 [skip ci]
- Sync VERSION file with release v0.1.35 [skip ci]
- Sync VERSION file with release v0.1.36 [skip ci]
- Sync VERSION file with release v0.1.37 [skip ci]
- Sync VERSION file with release v0.1.38 [skip ci]
- Sync VERSION file with release v0.1.39 [skip ci]
- Sync VERSION file with release v0.1.40 [skip ci]
- Sync VERSION file with release v0.1.41 [skip ci]
- Sync VERSION file with release v0.1.42 [skip ci]
- 更新依赖项版本
- Sync VERSION file with release v0.1.43 [skip ci]
- Sync VERSION file with release v0.1.44 [skip ci]
- Sync VERSION file with release v0.1.45 [skip ci]
- Sync VERSION file with release v0.1.46 [skip ci]
- 恢复 drizzle 迁移文件
- Sync VERSION file with release v0.1.50 [skip ci]
- Format code (dev-9ff5041) [skip ci]
- Sync VERSION file with release v0.1.51 [skip ci]
- Sync VERSION file with release v0.1.52 [skip ci]
- Format code (dev-6b384b8) [skip ci]
- Format code (dev-f2714d5) [skip ci]
- Format code (dev-e787517) [skip ci]
- Format code (dev-82e22f6) [skip ci]
- Format code (dev-4a9d577) [skip ci]
- Format code (dev-75507de) [skip ci]
- Format code (dev-5a8538a) [skip ci]
- Format code (dev-b2bd3ae) [skip ci]
- Format code (dev-e19e8fe) [skip ci]
- Format code (dev-b1335d0) [skip ci]
- Format code (dev-a953b24) [skip ci]
- Format code (dev-c3b4a85) [skip ci]
- Format code (dev-420e396) [skip ci]
- Sync VERSION file with release v0.2.1 [skip ci]
- Sync VERSION file with release v0.2.2 [skip ci]
- Format code [skip ci]
- Sync VERSION file with release v0.2.3 [skip ci]
- Sync VERSION file with release v0.2.4 [skip ci]
- Format code (dev-06db148) [skip ci]
- Sync VERSION file with release v0.2.5 [skip ci]
- Format code (dev-06db148) [skip ci]
- Sync VERSION file with release v0.2.6 [skip ci]
- 更新 GitHub Actions 工作流
- 更新 GitHub Actions 工作流以监听新的 CI 流程
- Sync VERSION file with release v0.2.7 [skip ci]
- Sync VERSION file with release v0.2.8 [skip ci]
- Sync VERSION file with release v0.2.9 [skip ci]
- Sync VERSION file with release v0.2.10 [skip ci]
- Sync VERSION file with release v0.2.11 [skip ci]
- Sync VERSION file with release v0.2.12 [skip ci]
- Disable progress tracking in GitHub Actions workflow
- Sync VERSION file with release v0.2.10 [skip ci]
- Remove [skip ci] from code formatting commit message
- Format code (dev-79ac40e)
- Sync VERSION file with release v0.2.11 [skip ci]
- Format code (dev-efaeea4)
- Sync VERSION file with release v0.2.13 [skip ci]
- Update GitHub Actions workflows to streamline event triggers
- Update GitHub Actions workflows to streamline event triggers
- Format code (dev-c257954)
- Format code (dev-a17892a)
- Format code (dev-18d59f4)
- Format code (dev-48b7125)
- Sync VERSION file with release v0.2.12 [skip ci]
- Sync VERSION file with release v0.2.14 [skip ci]
- Sync VERSION file with release v0.2.15 [skip ci]
- Sync VERSION file with release v0.2.16 [skip ci]
- Sync VERSION file with release v0.2.17 [skip ci]
- Sync VERSION file with release v0.2.18 [skip ci]
- Sync VERSION file with release v0.2.19 [skip ci]
- Sync VERSION file with release v0.2.20 [skip ci]
- Sync VERSION file with release v0.2.21 [skip ci]
- Sync VERSION file with release v0.2.13 [skip ci]
- Format code (dev-9be8619)
- Format code (dev-4c14b1f)
- Sync VERSION file with release v0.2.22 [skip ci]
- Format code (dev-ad16e49)
- Format code (dev-2cb425c)
- Format code (dev-460f6f2)
- Sync VERSION file with release v0.2.23 [skip ci]
- Format code (dev-9a759a2)
- Sync VERSION file with release v0.2.24 [skip ci]
- Sync VERSION file with release v0.2.25 [skip ci]
- Format code (dev-8631a2c)
- Format code (dev-991eaeb)
- Format code (dev-9f32de1)
- Sync VERSION file with release v0.2.26 [skip ci]
- Format code (dev-a039f9f)
- Format code (dev-bbe8e12)
- Sync VERSION file with release v0.2.27 [skip ci]
- Update .prettierignore to exclude GitHub Actions workflows and large seed data files
- Sync VERSION file with release v0.2.28 [skip ci]
- Update CI/CD workflow to support all branches except main, enhance tagging strategy
- Update CI/CD workflow to support all branches except main, enhance tagging strategy (ding113#76)
- Format code (dev-49d118d)
- Comment out unused Card component in DataGeneratorPage
- Format code (dev-deafa29)
- Sync VERSION file with release v0.2.29 [skip ci]
- Format code (dev-0ae8bf1)
- Format code (dev-86297d6)
- Format code (dev-8e6f28d)
- Update CI workflow names for clarity
- Sync VERSION file with release v0.2.30 [skip ci]
- Sync VERSION file with release v0.2.31 [skip ci]
- Format code (dev-d5813c2)
- Format code (dev-84da937)
- Format code (dev-7ed4e91)
- Trigger CI rerun after format fix
- Format code (dev-ba52d3d)
- Trigger CI for PR ding113#86
- Add CI trigger file to ensure checks run
- Sync VERSION file with release v0.2.32 [skip ci]
- Skip initialization in CI environment
- Format code (dev-0a3c9d6)
- Sync VERSION file with release v0.2.33 [skip ci]
- Format code (feat-i18n-918600b)
- Update .gitignore to exclude logs directory except for specific paths
- Remove outdated translation and implementation guide files
- Unify settings.json keys across locales using zh-CN as canonical
- Format code (feat-i18n-5f5c11e)
- Format code (feat-i18n-bab36a6)
- Format code (feat-i18n-00c3bd4)
- Sync VERSION file with release v0.2.34 [skip ci]
- Format code (dev-84c05c1)
- Trigger CI rerun after format fix
- Trigger CI for PR ding113#86
- Add i18n-verification directory to .gitignore
- Format code (feat-i18n-2bf2998)
- Format code (feat-i18n-1ad5fe2)
- Trigger CI re-run after format fixes
- Format code (feat-i18n-99767af)
- Trigger CI re-run - code already formatted
- Format code (feat-i18n-47e843a)
- Trigger CI re-run - formatting already fixed in 1e5d289
- Trigger CI - formatting already fixed
- Format code (dev-f3ee76f)
- Format code (feat-guard-pipeline-072d3fc)
- Sync VERSION file with release v0.2.36 [skip ci]
- Sync VERSION file with release v0.2.37 [skip ci]
- Format code (dev-cdd5a6f)
- Sync VERSION file with release v0.2.38 [skip ci]
- Sync VERSION file with release v0.2.39 [skip ci]
文档更新
- 重构项目文档并添加部署配置
- 完善部署文档和修复 UI 问题
- 添加用户绑定上游、智能重试和排行榜系统技术方案
- 更新文档
- 更新 README 截图和使用文档
- 完善环境配置文档和注释 (ding113#1)
- 添加 Repository Guidelines 开发指南
- 更新 README,标注 Codex 支持状态并添加致谢
- 更新 README,新增功能描述和优化信息
- Add Telegram group link for community discussions in README
- Add bilingual documentation and language switcher
- Update README files with enhanced features and installation instructions
新功能
- Add system settings config and simplify message logging
- Improve cost precision handling
- 添加版本管理和更新检查功能
- 实现完整的自动化发布流程
- 实现供应商智能路由和熔断系统
- 实现上游决策链和使用日志功能
- 完成使用记录、排行榜和调度规则可视化系统
- 添加 Codex 支持和相关字段
- 增强代理选择逻辑
- 扩展价格表上传支持
- 增强供应商监控和熔断管理功能
- 增强日志自动刷新、优化 Docker 配置和供应商管理
- 移除用户名正则验证规则,简化用户创建和更新模式
- 添加新的响应 API 路由以支持 Codex
- Update Footer component to display application version
- 完善 Codex API 请求转换和注入 Codex CLI instructions
- 添加 LiteLLM 价格表自动同步功能
- 在日志页面展示缓存 Token 详细信息
- Add ConcurrentSessionsCard to dashboard and logs pages
- 实现基于内容哈希的 Session 会话粘性机制
- 优化 Session 识别机制并改进 UI 显示
- 新增活跃 Session 实时监控页面
- 将 Session Messages 改为全屏子页面并增强功能
- 增强统计图表和 Session 监控功能
- 引入 Prettier 代码格式化工具并集成到 CI/CD
- 统一首页统计周期为当天
- 实现敏感词过滤功能
- 优化首页并发卡片为实时概览面板
- 使用记录页面新增动效和实时性优化
- 重构活跃 Session 展示为简洁列表形式
- 在日志页面显示被敏感词拦截的请求
- 添加 Cookie 安全策略环境变量配置
- 添加完整的本地开发工具集
- 支持数据库导入/导出功能
- 增强数据库备份功能的可靠性和安全性
- 预置价格表并在启动/发布时自动初始化和更新
- 优化数据管理界面和数据库导入错误处理
- 扩展消息表字段,支持原始模型、客户端信息和上下文分析
- 增强供应商选择决策链追踪和可视化
- 实现短上下文并发检测机制,防止错误会话复用
- 实现 Session 响应体存储和实时监控展示
- 优化 Dashboard UI 并支持模型重定向可视化
- 添加 dev 分支持续部署工作流
- [breaking] 完全移除实时调度和统计分析功能
- 为 API Key 增加 Web UI 登录权限控制
- 为 providers 表添加 allowed_models 列以限制可调度模型
- 添加页面刷新功能以同步熔断器状态和字段更新
- 增加供应商模型限制功能
- 添加模型白名单功能以限制供应商可调度的模型
- 添加货币显示配置和日志自动清理功能
- 完成货币符号切换功能的全局适配
- 实时排行榜 + Redis 乐观缓存
- 实现完整的多提供商类型支持和格式转换系统
- 暂时禁用非 Claude 供应商类型选项
- 实现 OpenAI Compatible → Codex 完整转换支持
- 增强 Codex API 兼容性和部署稳定性
- 对非官方客户端的 Codex 请求强制执行清洗处理
- 文档页面支持公开访问和完整重构
- 添加 Claude AI GitHub Actions 工作流
- 服务商管理页面中,增加快速克隆服务商按钮
- 实现自动日志清理功能的 API 接口
- 添加动态配置支持及相关功能
- 扩展支持 claude-auth 供应商类型
- 优化熔断器配置逻辑支持空值
- 优化健康状态检查逻辑及 Redis 重试日志
- 新增 Anthropic Auth Token 支持;新增自定义熔断配置;增加 API Key 最大长度 (ding113#18)
- 添加通知任务及管理界面支持
- 动态生成每日排行榜及成本预警数据
- 更新使用文档
- Add experimental Codex Instructions injection feature
- Add user group validation in ProxyProviderResolver
- Update provider statistics query to use local date range
- Add provider and user limit usage functions
- Add key quota management with edit dialog and improved layout
- Unify currency display across all quota management pages
- 新增限额管理功能 (ding113#27)
- 修复探测请求处理和优化决策链逻辑
- 添加服务端专用包的排除配置
- Add new columns to system_settings for provider info visibility and currency display
- 支持客户端中断信号和智能 Session 绑定策略
- 添加限额管理工具函数及用户限额组件
- 添加倒计时 Hook 和限额标签组件扩展
- Add new API documentation link to settings navigation
- Enhance API documentation and pagination features
- REST API 支持;告警通知支持;调度器和决策链优化、限额管理 UI 优化 (ding113#42)
- Add provider-level proxy support (HTTP/HTTPS/SOCKS4/SOCKS5)
- Add installation instructions with tabs for Native and NPM methods in usage documentation
- Enhance data detailed views.
- Add circuit breaker configuration for network errors
- 优化供应商调度规则说明 - Phase 1
- 增加环境变量控制网络错误是否计入熔断器
- Add client version check and codex instructions strategy
- Enhance provider quota management and UI
- Add codex instructions strategy to provider management
- Update client version stats table to use icon components
- Enhance version checking and caching logic
- Add sorting functionality to provider manager
- 重构供应商管理页面 UI/UX
- Enhance leaderboard API and UI with scope filtering
- Hide overview panel for non-admin users
- Integrate next-intl for internationalization support
- Load translation messages dynamically for current locale
- Complete English dashboard.json translations
- Update translations and improve locale handling
- Enhance dashboard and settings translations
- Expand translations for dashboard and settings
- Enhance key management translations and improve user interface
- Update Russian and Traditional Chinese translations for settings and quota
- Enhance Redis client configuration and logging
- 扩展不可重试的客户端错误定义和模式 (ding113#94)
- Enhance translations for user management and settings
- Implement complete i18n for provider chain formatter and related components
- Complete provider-form i18n; add nested providers.form keys across zh-CN/zh-TW/en/ru/ja and replace hardcoded text with t()
- Add optional endpoint fields and ProxySession.getEndpoint() extracting URL.pathname
- Enhance error handling for FastAPI/Pydantic validation errors
- Track request endpoint and expose distinct endpoints
- Add new journal entry for 'sudden_bruce_banner' and update schema with endpoint field
- Add getEndpointList server action to return distinct endpoints with auth and error handling
- Add endpoint filtering UI and highlight non-billing rows
- Show absolute timestamp tooltip on RelativeTime using shadcn Tooltip and date-fns
- Add healthcheck to service and update Dockerfile to include curl
- Introduce configurable Guard Pipeline system
- Add multilingual support for provider components
📋 完整更新日志
查看 所有版本
Full Changelog: https://github.com/blackrion/claude-code-hub/commits/v0.2.39