Repository navigation
Sub2API 0.2.11-custom1
Pre-release
Pre-release
·
651 commits
to main
since this release
AI API Gateway Platform - 将 AI 订阅配额分发和管理
基于上游 v0.2.11 同步,包含以下自定义功能。
自定义功能
OpenAI 403 处理策略
rate_limit.openai_403_ignore:设为true时跳过 OpenAI 403 的全部账号副作用,不计数、不临时下线、不永久禁用,账号保持可用,并将原始 403 响应直接透传给客户端。rate_limit.openai_403_disable_threshold:连续 403 次数达到该阈值时才永久禁用账号;未达到阈值时仅临时下线。设为小于或等于0时使用内置默认值3。
上游更新
AI API Gateway Platform - 将 AI 订阅配额分发和管理
新增 GPT-6.1 Sol 模型支持和 Claude 原生限额重置兑换;余额模式新增在途额度预占,防止并发请求导致透支。
新增功能
- 支持 GPT-6.1 Sol 模型(含定价、模型目录与各兼容入口转换)
- Claude 账号支持兑换原生限额重置:查询到可兑换额度后,可在账号列表中经二次确认一键重置
- 使用密钥弹窗的 Codex 配置支持远程模型目录(Codex 0.156.0+),旧版客户端仍可选择本地文件模式
- 识别 ChatGPT 最新订阅套餐类型,账号套餐标签显示更准确
- 新增 API Key 创建数量与频率限制:每用户最多 200 个有效 Key、每小时最多创建 60 次(可配置,0 表示不限制)
优化改进
- 支持 Astra Ultrafast 模型的能力识别与计费
- 开启「仅限 Claude Code」并配置了降级分组的分组,其 OpenAI 兼容入口(Chat Completions / Responses)改走降级分组,不再直接返回 403
Bug 修复
- 修复余额模式下多个高成本请求并发时可能透支余额的问题:请求准入时按预估成本预占在途额度,计费完成后释放
破坏性变更
- API Key 创建限制默认开启:单用户有效 Key 超过 200 个或一小时内创建超过 60 次时,将无法继续创建。如需调整,修改配置
api_key_create.max_active_per_user/api_key_create.max_per_user_per_hour(设为 0 表示不限制) - 余额在途预占默认开启:余额较低的用户在并发请求时,可能比以前更早被拒绝。可通过
billing.inflight_reservation配置关闭或调整
📥 Installation
Docker:
# Docker Hub
docker pull weishaw/sub2api:0.2.11
# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.2.11One-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
Image
ghcr.io/an-epiphany/sub2api:0.2.11-custom1
📥 Installation
Docker:
# GitHub Container Registry
docker pull ghcr.io/an-epiphany/sub2api:0.2.11-custom1One-line install (Linux):
curl -sSL https://raw.githubusercontent.com/an-epiphany/sub2api/main/deploy/install.sh | sudo bashManual download:
Download the appropriate archive for your platform from the assets below.