empty
ed888edfc9
feat: 增强 Token 过期验证机制
...
- 添加 tokenExpiresAt 状态变量追踪实际过期时间
- saveTokens() 保存 expires_at 字段到文件
- loadAuthConfig() 启动时验证 token 是否过期
- shouldRefresh() 优先使用实际过期时间判断
- 提前 30 分钟刷新避免临界问题
- 修复 refreshApiKey() 中的代码缩进问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 15:22:01 +08:00
empty
a18e45ee78
feat: add refresh retry/timeout and tests
2025-12-27 15:07:54 +08:00
Claude Code
c5efebb805
chore: 切换到生产模式并清理配置
...
- 移除 docker-compose.yml 中已过时的 version 字段
- 将 dev_mode 设置为 false
- 添加 accounts.json 加载调试日志
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2025-12-27 06:00:18 +00:00
empty
dab863fcfe
feat: 添加多账号 OAuth 支持
...
- 新增 add-account.js OAuth 批量授权辅助工具
- 新增 account-manager.js 多账号管理模块(加权轮询、自动刷新、健康度统计)
- 新增 accounts.json.example 配置示例
- 修改 auth.js 支持多账号模式(优先检测 accounts.json)
2025-12-27 12:23:41 +08:00
Claude Code
0b04c300c0
fix: 修复 Claude Code 伪装为 Factory CLI 的 403 错误
...
主要修改:
1. 过滤 anthropic-beta header 中的 Claude Code 特有标识
2. 删除 context_management 字段
3. 过滤所有 Claude Code 特有工具(Skill, EnterPlanMode 等)
4. 过滤所有 MCP 相关工具
5. 过滤 messages 内容中的 Claude Code 特征文本
6. 处理 system 字段中的 cache_control 和字符串替换
7. 添加认证容错机制,token 失效时降级到 client authorization
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-26 15:46:09 +00:00
1e0n
7d037a6e9a
现在官方会对ip地址进行限速,所以增加代理服务器功能
2025-10-24 12:34:21 +08:00
1e0n
25f89a12b7
实现双授权系统:支持FACTORY_API_KEY环境变量优先级和客户端授权回退机制
...
- 新增FACTORY_API_KEY环境变量支持(最高优先级)
- 保留现有refresh token自动刷新机制
- 添加客户端authorization头作为fallback
- 优化启动流程,无认证配置时不报错退出
- 更新所有端点支持新的授权优先级系统
- 修改GPT-5-Codex推理级别为off
2025-10-08 19:42:39 +08:00
1e0n
3aebe7e723
Optimized Log Display
2025-10-07 02:14:55 +08:00
1e0n
6dca025e96
Initial commit: OpenAI compatible API proxy with auto token refresh
...
- Implemented OpenAI compatible API proxy server
- Support for Anthropic and custom OpenAI format conversion
- Automatic API key refresh with WorkOS OAuth
- SSE streaming response transformation
- Smart header management for Factory endpoints
- Chinese documentation
2025-10-06 02:12:01 +08:00