Releases: Wei-Shaw/sub2api
Sub2API 0.1.87
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
支持 Claude Opus/Sonnet 4.6 模型(后端定义 + 前端预设映射)
-
新增 Gemini 3.1 Pro High / Pro Low 模型支持
-
新增 Gemini 3.1 Flash Image 模型,替代 gemini-3-pro-image
-
补齐 GPT-5.3 系列模型到白名单、批量编辑列表与预设映射
-
Sora 平台支持手动导入 Access Token
-
补齐 OpenAI / Antigravity OpenCode 模板模型配置
-
更新 opencode.json 模板至 Claude 4.6(默认启用 thinking)
-
管理端用量页面添加列显示设置
-
切换语言时同步更新页面标题
-
批量编辑添加跨平台模型映射警告与过滤
-
使用 go-sora2api SDK 替代自建 Sora 客户端,削减约 3000 行代��
-
测试连接模型列表改为复用 antigravity.DefaultModels,消除硬编码
-
将 DriveClient 注入 GeminiOAuthService,消除单元测试中的真实 HTTP 调用
-
对齐 Gemini v1beta 模板模型与顺序
-
调整模型定价文件仓库来源
-
修复 2K 图片缺少默认定价的问题(1.5 倍基础价格)
-
修复编辑账号弹窗缺少优先级提示
-
更新 antigravity user-agent 版本至 1.19.6
-
count_tokens 端点不支持时返回 404 而非伪造 200
-
count_tokens 端点不支持时降级返回空值
-
临时移除 fast-mode-2026-02-01 避免 429 问题
-
修复流式响应中 URL 的 & 被转义为 \u0026 的问题
-
修复 sora_sdk_client 类型断言未检查的 errcheck lint 错误
-
移除 PostgreSQL 容器多余重复的 PGDATA 环境变量
-
修正 Gemini 3.1 Pro High/Low 发布日期
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.87
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.87One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.86
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
新增 claude-sonnet-4-6 和 gemini-3.1-pro 模型支持及对应计费定价
-
新增混合渠道预检 API,创建/编辑账号前可提前验证渠道冲突风险
-
补充 Antigravity 的 Gemini 3.1 Pro 透传快捷按钮和模型映射
-
Antigravity OAuth 客户端密钥支持内置默认值,无需额外配置环境变量
-
模型限速指示器优化为响应式布局,使用短别名和倒计时显示
-
Warmup 请求拦截扩展支持 Antigravity 平台
-
重构 Failover 错误处理逻辑,提取为共享的 FailoverState 模块,减少重复代码
-
Gemini 平台启用 model_mapping UI 和模型过滤
-
Antigravity 使用映射后的模型进行计费和限速,确保一致性
-
区分客户端断开连接与上游重试失败的错误信息
-
移除无用的 ClientSecret 常量和冗余代码
-
修复 GO-2026-4512 安全漏洞(升级 utls 至 v1.8.2)
-
修复 Claude 用量进度条不显示 4.6 模型的问题
-
修复 Gemini 授权链接生成失败的问题
-
修复刷新用量后未自动清理账号可恢复错误状态
-
修复 intercept_warmup_requests 配置未保存的问题
-
修复前端批量编辑和状态网格布局问题
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.86
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.86One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.85
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
Sora 平台支持:完成 OAuth 流程、网关接入、媒体生成、TLS 指纹、Cloudflare 挑战处理,移除 sora2api 外部依赖
-
OpenAI OAuth 透传:支持自动透传开关、User-Agent 透传、Codex 官方客户端限制开关
-
Anthropic API Key 自动透传并优化透传链路性能
-
Gemini 3→3.1 模型映射及前端快捷按钮,新增 gemini-3.1-pro-preview 模型
-
关键写接口幂等保护,完善并发容错
-
API Key 上次使用时间记录
-
统一日志底座与系统日志运维能力,运维监控新增 OpenAI Token 请求统计表
-
代理质量检测结果持久化并在列表展示
-
Antigravity User-Agent 版本��通过环境变量 ANTIGRAVITY_USER_AGENT_VERSION 配置
-
JWT 密钥启动时自动迁移并持久化
-
使用量记录有界 worker 池与自动扩缩容
-
Codex CLI 模式强制及 UA 伪装
-
账号自动刷新改为 ETag 增量同步
-
使用 gjson/sjson 优化热路径 JSON 处理,替代全量序列化
-
SSE Scanner buffer 改用 sync.Pool 复用,减少高并发 GC 压力
-
订阅模式认证中间件优化,5 次串行调用降至 2 步同步 + 1 步异步
-
网关热点路径优化并补齐高覆盖测试
-
jitterTTL 改用 rand/v2 并移除全局锁
-
重试场景 thinking 过滤性能优化
-
连接池参数调优(max_conns_per_host=8192)
-
启用 h2c 并保留 HTTP/1.1 回退
-
常规成功日志降级为 Debug 级别降噪
-
账号管理改为单行增量更新避免全量刷新
-
修复密码重置链接 Host Header 注入漏洞(P0)
-
修复 Sora 媒体落地路径穿越风险
-
修复 OpenAI usage 为空导致 panic(P0)
-
修复管理员 JWT 未校验 TokenVersion 问题
-
修复仅配置小时时 JWT 会话提前失效
-
修复粘性会话预取分组错配
-
修复 SSE delta 将缓存创建明细重置为 0
-
修复 codex_cli_only 误拦截问题
-
修复 OAuth 透传流式断开与压缩头问题
-
修复 Postgres 数据未持久化导致重启后无法登录
-
修复日志重复输出及清理冗余迁移逻辑
-
修复限流时未同步清理临时不可调度状态
-
修复余额显示样式深色模式不兼容
-
修复额度窗口过期展示问题
-
修复前端审计问题并补充回归测试
-
后端单元测试覆盖率提升至 85%+
-
多轮代码审计修复(安全、数据一致性、性能)
-
完成后端日志结构化迁移
-
清理过时的 codex skills 和部署脚本
-
恢复并完善 CI 集成测试
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.85
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.85One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.84
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
前端新增 Sonnet 4.6 快捷映射按钮
-
支持账号级 Cache TTL 覆写,可将 Anthropic 缓存令牌的 5 分钟/1 小时分类进行重写
-
临时移除 context-1m-2025-08-07 以避免 sonnet4.6[1m] 触发 429 错误
-
修复 Codex 模型请求中不支持的参数未被过滤的问题
-
修复 OpenAI x-stainless-* 请求头导致的 CORS 错误
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.84
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.84One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.83
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
Anthropic 缓存计费细分:区分 ephemeral_5m 和 ephemeral_1h 两种缓存创建 token,按各自单价分别计费
-
前端使用记录展示 5m/1h 缓存创建明细,带彩色 badge 区分
-
修复 usage_log GORM column tag 确保写入正确的数据库列
-
删除 GORM 自动生成的重复列(迁移 054)
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.83
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.83One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.82
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
管理后台账号列表支持按分组筛选
-
docker-compose.yml 补充 PGDATA 环境变量配置
-
配置 gosec 安全扫描排除规则,排除 API 网关场景下的 SSRF 误报
-
修复 Anthropic 429 限流使用聚合最大值导致账号被标记为约 6 天不可调度的问题,改为使用精确的窗口重置时间
-
修复 StatCard 数值溢出显示问题
-
修复侧边栏 Logo 加载时的闪烁问题
-
修复 gosec 配置文件格式错误导致 CI 失败
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.82
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.82One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.81
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
Antigravity 支持 Refresh Token 批量导入创建 OAuth 账号
-
Claude Thinking 支持 adaptive 类型并适配 Opus 4.6 动态预算分配
-
管理后台账户列表支持邮箱搜索和限流状态过滤
-
兑换码搜索支持用户邮箱匹配,导出 CSV 新增 used_by_email 列
-
用户列表支持按 API Key 搜索
-
修复 Gemini 2.5 Pro/Flash thinking 模型的 thoughtsTokenCount 未计入输出 token 计费的问题
-
修复��录/注册页面自定义 Logo 不显示及闪烁问题(支持 data:image base64 格式)
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.81
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.81One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.80
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
Antigravity OnboardUser API:账号 onboarding 后自动获取 project_id
-
loadProjectIDWithRetry 增加 onboard 回退:LoadCodeAssist 未返回 project_id 时自动触发 onboarding
-
GetAccessToken 中 project_id 补齐改用轻量 FillProjectID 替代全量 RefreshAccountToken
-
补齐逻辑增加 5 分钟冷却机制,防止频繁重试
-
OnboardUser 轮询等待改为 context 感知,支持提前取消
-
提取 mergeCredentials 辅助方法消除重复代码
-
新增 extractProjectIDFromOnboardResponse 和 resolveDefaultTierID 单元测试
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.80
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.80One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.79
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
MODEL_CAPACITY_EXHAUSTED (503) 使用固定 1s 间隔重试最多 60 次,不切换账号
-
瞬态错误(Google 400、空流响应)同账号重试 2 次后再触发故障转移
-
空流响应触发 failover 自动换号重试,不再直接返回 502
-
Google "Invalid project resource name" 400 错误触发 failover 并临时封禁账号 1 小时
-
错误透传规则新增 skip_monitoring 选项,匹配的错误不记录到运维监控日志
-
Antigravity 转发支持 daily/prod 单 URL 切换
-
错误匹配性能优化:延迟/限制 body ToLower,预计算规则关键词和平台集合
-
MODEL_CAPACITY_EXHAUSTED 全局去重,避免并发请求重复重试
-
503 重试 body 读取限制从 2MB 降至 8KB
-
time.After 替换为 time.NewTimer,防止 context 取消时 timer 泄漏
-
临时封禁冷却时间从 30 分钟缩短至 1 分钟(同账号重试耗尽后)
-
修复错误透传规则 skip_monitoring 未生效的问题
-
修复 CI 检查失败(gofmt、errcheck、staticcheck)
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.79
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.79One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.
📚 Documentation
Sub2API 0.1.78
AI API Gateway Platform - 将 AI 订阅配额分发和管理
-
单账号 503 退避重试:当分组内只有一个可用账号且上游返回 503 时,原地等待重试而非切换账号,避免双重等待和请求雪崩
-
修复单账号分组首次 503 设置模型限流标记导致后续请求雪崩的问题
-
移除特定 system prompt 注入以适配新版 CC 客户端缓存失效的 bug
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.1.78
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.78One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.