Repository navigation
AI API Gateway Platform - 将 AI 订阅配额分发和管理
v2.24.1 将 DeepSeek 输出格式标准化校验纳入正式版。使用 DeepSeek 平台的 API Key 账号,以 deepseek- 前缀模型调用 /v1/chat/completions 流式接口时,如果上游把空 delta 和真正的 assistant 首块粘在同一 SSE 事件里,网关会识别这一结构并移除多余空块,避免严格客户端在解析首事件时报 Extra data。校验适用于不同上游地址,正常事件、工具调用、错误事件和结束标记按原流程传递。#994
- Anthropic 流式交付与用量。原生转发现在能区分上游缺少用量字段和明确返回零用量。向客户端刷新数据失败时,网关会记录交付失败,并继续读取上游以保留已返回的用量。启用请求采集时也会传递刷新错误。#991
- 利润报表刷新。多个请求共用一次查询时,如果前一个请求被取消,仍在等待的有效请求会重新查询一次,避免刷新页面时直接收到之前的取消错误。#992
- Antigravity 配额倒计时。配额尚未使用时隐藏随刷新而推迟的重置时间。已经使用的配额继续显示上游返回的截止时间,即使用量低于 1% 也会保留。#993
- 渠道与账号运维。渠道管理默认按钱包分组展示余额,展开成员明细可查看账号和调整通知开关。OAuth 配额与生命周期统一放在「官方渠道」,原账号运维链接仍能定位到渠道管理。#996
📥 Installation
Docker:
# GitHub Container Registry
docker pull ghcr.io/ranxi2001/sub2api:2.24.1One-line install (Linux):
curl -fsSL https://raw.githubusercontent.com/ranxi2001/sub2api/v2.24.1/deploy/install.sh | sudo bash -s -- install -v v2.24.1Manual 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.1/deploy/upgrade-k3s.sh | sudo bash -s -- --version v2.24.1Defaults: namespace tosky-canary, Deployment tosky-nerd; override with --namespace NAME --deployment NAME.
Upgrade every instance sharing Redis to this release.