github ranxi2001/sub2api v2.24.3
Sub2API 2.24.3

one hour ago

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

v2.24.3 增加了按 API Key 查询用量明细的接口,修复了支付回调断开可能导致订单卡在入账中的问题,并减少了长对话经过网关时的重复解析和复制。

  • 用量查询。在用户面板的「使用记录 → 用量 API」可复制查询地址和示例。主站支持通过 GET /v1/usage/records 分页读取当前 Key 的明细,支持 JSON 和 CSV,每次最多查询 7 天、每页最多 1000 条。对账时,迟到入库的记录可通过重扫相应时间窗、按记录 ID 去重取回。接口文档
  • 付款入账。付款通过校验后,即使回调连接断开,服务端也会在独立的两分钟时限内继续处理订单。履约失败时另有十秒记录状态和审计。升级前已卡在 RECHARGING 的订单仍需单独核对。#1033
  • 网关账号连接测试。管理员可以用账号已配置的站点、Key 和代理测试文本模型。协议由获授权的分组确定,有多个可用协议时需明确指定。暂停或冷却中的账号也可诊断,测试结果独立于调度状态。#1011
  • 流式请求重试。WebSocket 同账号重试在等待或握手期间到期时,网关会结束该次重试。对于 HTTP 200 流中的明确配额耗尽终态,网关按 429 处理,避免再次请求已耗尽的账号。#1012
  • 长对话处理。OpenAI 和 Grok 路径减少了对历史消息、工具声明及 WebSocket 终态输出的重复扫描和复制。转换多段 Chat Completions 回复时,各类文本在收集完毕后一次拼接。桥接优化 · 工具回放优化 · 回复拼接优化

查看 v2.24.2 至 v2.24.3 的完整变更


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/ranxi2001/sub2api:2.24.3

One-line install (Linux):

curl -fsSL https://raw.githubusercontent.com/ranxi2001/sub2api/v2.24.3/deploy/install.sh | sudo bash -s -- install -v v2.24.3

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

K3s gateway upgrade (on each existing single-node host):

curl -fsSL https://raw.githubusercontent.com/ranxi2001/sub2api/v2.24.3/deploy/upgrade-k3s.sh | sudo bash -s -- --version v2.24.3

Defaults: namespace tosky-canary, Deployment tosky-nerd; override with --namespace NAME --deployment NAME.
Upgrade every instance sharing Redis to this release.

📚 Documentation

Don't miss a new sub2api release

NewReleases is sending notifications on new releases.