Skip to content

Releases: Annihilater/sub2api

Sub2API 0.1.141

10 Apr 10:36

Choose a tag to compare

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

  • 模型价格三层对比:管理后台新增 LiteLLM 对比列,直观展示数据库配置与 LiteLLM 动态价格的差异(↑偏高/↓偏低/=一致/?无数据)

  • 任意模型价格查询卡片:管理后台顶部新增查询卡片,输入任意模型名即可查看 LiteLLM / 数据库配置 / 内置 Fallback 三层价格及当前生效层

  • override_litellm 字段:支持对指定模型的数据库价格强制覆盖 LiteLLM 动态价格,适用于免费模型或需要固定计费的场景

  • 允许模型计费价格全为 0(之前强制要求至少一个价格 > 0,现已支持免费模型配置)

  • 升级 axios 至 1.15.0,修复 GHSA-3p68-rc4w-qgx5(NO_PROXY Hostname Normalization Bypass)安全漏洞

  • 新增 GET /admin/model-pricings/compare API:返回所有数据库条目并附带 LiteLLM 价格快照

  • 新增 GET /admin/model-pricings/lookup?model=xxx API:查询任意模型在三层的价格对比

  • 新增 BillingService.GetFallbackPricing() 方法暴露硬编码 Fallback 价格

  • 数据库迁移 086:model_pricings 表新增 override_litellm 字段


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.141

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.140

09 Apr 11:05

Choose a tag to compare

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


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.140

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.139

09 Apr 07:25

Choose a tag to compare

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


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.139

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.138

08 Apr 15:57

Choose a tag to compare

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

新功能

  • 用户请求趋势图新增"按用户" Tab,可选择指定用户查看其 Premium / Agent / 总量三条折线趋势
  • 新增 UserSingleChart.vue 独立组件,数据由父组件传入,零额外 API 请求
  • 默认自动选中当日 Premium 使用量最多的用户;纯 Agent 流量场景下降级选列表第一个用户
  • 时间范围(7/14/30/60 天)与页面全局选择器联动
  • Copilot 账户分析页新增按账户维度的每日 Premium/Agent 请求趋势图及 total 指标

修复

  • 日期范围切换后自动检测并重置无效的 selectedUserId,防止图表显示全零
  • 错误时清空 dailyData,防止按用户 Tab 渲染过期趋势线
  • 加载中显示 spinner,用户不在当前时间区间时显示明确提示

重构

  • 提取 resolveDefaultUserId 为独立纯函数,便于单元测试

文档

  • 补充 Copilot 无粘性会话设计分析及任务级计费审计局限性说明

📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.138

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.137

08 Apr 07:38

Choose a tag to compare

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

  • 删除 .github/workflows/build-image.yml(与 Release 重复构建镜像)
  • 在 release.yml 的 release job 中新增打包 deploy zip 步骤
    直接在 GoReleaser 完成后打包 deploy/ 目录并上传至 Release Assets
  • GoReleaser 已完整负责 GHCR/DockerHub 多平台镜像构建,无需额外 workflow

📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.137

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.136

07 Apr 11:15

Choose a tag to compare

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

ForwardChatCompletions 在有文件附件时会先调用 getSupportedEndpointsForModel
查询 /models 判断模型是否支持 /responses,原测试 mock server 未处理 /models
路径,导致探测失败后 fallback 到 /chat/completions,断言全部失败。

修复:在 4 个相关测试的 mock server 中增加 /models 路径处理,返回包含正确
supported_endpoints 的模型列表 JSON;对 UnsupportedAPIForModel 和
NonUnsupportedAPI400 测试新增 sawModelsRequest 断言确保探测行为。


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.136

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.135

07 Apr 05:45

Choose a tag to compare

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


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.135

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.134

05 Apr 04:16

Choose a tag to compare

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

新功能

  • 用户注册默认使用邮箱作为用户名(超长邮箱自动截断至 100 字符,与 OAuth 注册路径保持一致)
  • 请求诊断与追踪系统:新增 OpsSpan 埋点、瀑布图与 span 树形展示
  • quota_exhaustion_suspected 异常类型端到端支持(检测、采集、前端展示)
  • Copilot /responses 端点自动路由,支持 gpt-5.4 等 responses-only 模型
  • 请求排查新增用户筛选和异常类型下拉多选
  • Token 交换支持 context 取消

修复

  • ForwardMessages/ForwardChatCompletions 注入 stream_options.include_usage 修复 token 计数为 0
  • 请求列表对 usage_logs 按 request_id 去重,消除 failover 重试导致的重复行
  • 请求列表始终使用用户配置的慢请求阈值
  • 异常日志 request_id 为空导致原始数据无法关联查询
  • CI golangci-lint 格式检查和静态分析报错

安全

  • 更新 audit exceptions,添加 lodash/lodash-es GHSA-r5fr-rjxr-66jc 豁免
  • 续期 xlsx audit exceptions

📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.134

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.133

01 Apr 14:15

Choose a tag to compare

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


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.133

One-line install (Linux):

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

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

📚 Documentation

Sub2API 0.1.132

01 Apr 14:09

Choose a tag to compare

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


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/annihilater/sub2api:0.1.132

One-line install (Linux):

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

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

📚 Documentation