Skip to content

Sub2API 1.4.6

Choose a tag to compare

@github-actions github-actions released this 10 Aug 15:23
· 22 commits to main since this release

AI API Gateway Platform - 将 AI 订阅配额分发和管理

定向回灌 upstream 三条边界明确、彼此独立的修复。

  • API Key 入参校验 (f5c108c83):quota 与 5h/1d/7d rate limit 拒绝 NaN、Inf 与负数;expires_in_days 必须大于零。
  • Responses→Anthropic 转换 (64090de66):显式跳过 reasoning item,未知 role/type 改走白名单转换,并丢弃转换后为空内容或纯空白 text 的消息。修复带 content 数组的 reasoning item 被原样透传给 Anthropic 换回 400、且该 item 常驻会话历史导致此后每轮持续失败的问题。
  • 系统日志落库退避 (e687ca3e9):连续写入失败后按 2s→60s 指数退避暂停落库,避免尽力而为的观测数据长期占用数据库连接池。健康路径不受影响。

本轮不含 358e4a89a(个人订阅到期时间被 POID workspace entitlement 覆盖):其依赖本地缺失的 eba204632 与 d0b8760eb 前置链,且与本地 selectChatGPTAccountInfo 重构冲突,留待 v1.4.7 单独移植。

继续保留本地 image 生图链路与单体 OpenAI 网关结构;upstream 的 Grok 产品线、channel-monitor-v2 与 response-model 计费系列本轮均不吸收。

golangci-lint run ./... 0 issues;backend test-unit / test-integration 全绿;test-frontend(vue-tsc typecheck + 78 tests)全绿;docker 运行时资源检查通过。


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/atoz03/sub2api:1.4.6

One-line install (Linux):

curl -sSL https://raw.githubusercontent.com/atoz03/dev_s2i/main/deploy/install.sh | sudo bash

Manual download:
Download the appropriate archive for your platform from the assets below.

📚 Documentation