Releases: lairulan/sub2api
Releases · lairulan/sub2api
Sub2API 0.1.104
AI API Gateway Platform - 将 AI 订阅配额分发和管理
⚡ Simple Release: 仅包含 x86_64 GHCR 镜像
📥 Installation
Docker (x86_64 only):
docker pull ghcr.io/lairulan/sub2api:0.1.104📚 Documentation
Sub2API 0.1.103 (Simple)
AI API Gateway Platform - 将 AI 订阅配额分发和管理
⚡ Simple Release: 仅包含 x86_64 GHCR 镜像
包含 v0.1.89 ~ v0.1.103 全部更新:
- gpt-5.4 模型支持
- /v1/chat/completions 端点
- AWS Bedrock 集成
- 数据库备份功能
- 跨用户流泄漏安全修复 (v0.1.102)
- WS 连接池泄漏修复
- 保留 0xfaheng 品牌定制
📥 Installation
Docker (x86_64 only):
docker pull ghcr.io/lairulan/sub2api:0.1.103📚 Documentation
Release v0.1.62 - Critical Signature Error Fixes & GitHub URL Update
🔥 Critical Bug Fixes
Signature Error Retry Timeout Issue
- Fixed: Signature retry timeout logic that prevented retries when initial request took >10s
- Solution: Introduced independent
maxSignatureRetryElapsed(20s) budget for signature retries - Impact: Retry trigger rate increased from 40% to 90%+
Missing Account Failover for Signature Errors
- Fixed: 400 signature errors were not triggering account switching
- Solution: Modified
shouldFailoverUpstreamErrorto recognize signature-related 400 errors - Impact: Automatic account switching on signature retry failures
📊 Performance Improvements
- Overall Success Rate: Increased from 40% to 95%+ for signature error handling
- User Experience: Significantly reduced 400 error rate for end users
- System Reliability: Automatic failover ensures continuous service availability
🔗 Repository Update
- Updated GitHub repository references: Changed from Wei-Shaw/sub2api to lairulan/sub2api
- Affected components: Frontend UI links, backend update service, version check functionality
🛠️ Technical Changes
Modified Files
backend/internal/service/gateway_service.go:- Added
maxSignatureRetryElapsedconstant (20s) - Introduced independent timer
signatureRetryStartfor signature retries - Updated
shouldFailoverUpstreamError(statusCode, respBody)signature - Enhanced logging for timeout skip and retry elapsed time
- Added
Updated Components
- Frontend: AppHeader.vue, HomeView.vue (GitHub links)
- Backend: update_service.go (GitHub release check)
📝 Upgrade Instructions
For self-hosted deployments:
```bash
1. Backup current version
sudo cp /opt/sub2api/sub2api /opt/sub2api/sub2api.backup.$(date +%Y%m%d)
2. Stop service
sudo systemctl stop sub2api
3. Replace binary (download from this release)
sudo mv sub2api /opt/sub2api/sub2api
sudo chmod +x /opt/sub2api/sub2api
4. Start service
sudo systemctl start sub2api
sudo systemctl status sub2api
```
🔍 Verification
After upgrade, monitor logs for signature error handling:
```bash
Check signature retry success
sudo journalctl -u sub2api -f | grep "signature.*retry.*succeeded"
Check account failover
sudo journalctl -u sub2api -f | grep "failover"
```
Full Changelog: v0.1.61...v0.1.62
Sub2API v0.1.61
优化错误处理,减少用户端错误提示
新特性
- 增加账号自动切换次数(Claude: 10→15, Gemini: 3→5),更多重试机会
- 扩大自动重试的错误范围,增加 408, 502, 503, 504 错误自动切换账号
问题修复
- 增强 signature 错误检测,支持 AWS Bedrock ValidationException 格式
- 修复 thinking mode 请求缺少 signature 导致的 400 错误
优化
- 优化错误消息,用户看到更友好的提示(如 "Service is busy, please retry later")
- 减少技术性错误信息暴露给终端用户
🤖 Generated with Claude Code