v0.1.176

Wei-Shaw/sub2apiv0.1.176Aug 13, 2026by github-actions[bot]

AI Summary

This release adds support for Grok 4.6 models and JWT subscription tier recognition. It introduces per-model pricing for groups and a new x_search endpoint, along with various fixes for pricing and monitoring.

Key Highlights

  • Grok 4.6 models (grok-4.6/grok-4.6-latest) added with official pricing and 200k context support.
  • JWT subscription tokens are now decoded to automatically identify tiers (Free/SuperGrok/Heavy/Lite).
  • Groups now support per-model pricing and long context pricing toggles.
  • New x_search endpoint added for Grok groups.

New Features

  • Grok 4.6 support.
  • JWT subscription tier recognition.
  • Per-model pricing for groups.
  • x_search endpoint support.

Full Release Notes

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

新增 Grok 4.6 模型支持与 JWT 订阅档位识别;分组支持逐模型定价与长上下文阶梯开关;新增原生 x_search 搜索端点。

## 新增功能

- Grok 4.6:新增 grok-4.6 / grok-4.6-latest 目录、官方定价(含缓存读取价与 200k 长上下文倍率)与请求路径支持
- JWT 订阅档位识别:从 Grok Build access token 解码 tier claim,自动识别 free/SuperGrok/Heavy/Lite 等档位,刷新后覆盖失效订阅
- 分组逐模型定价:分组新增 model_pricing 与 long_context_pricing_enabled 字段,解析链改为 Group → Channel → 内置,关闭长上下文时 token 模型只取最低档
- x_search 端点:新增独立 POST /x_search(仅 Grok 分组),复用 web_search 的审计、failover 与按次计费
- Chat↔Responses 保留 x_search 过滤字段与 tool_choice,上游补 sources 抽取

## 优化改进

- 账号徽章与用量格按实时档位展示,避免账单滞后误判
- SuperGrokPro 用 grok-4.5 窗口区分 Heavy 档位,容量抖动时只封单模型而非整号

## Bug 修复

- 修复定时备份未加 leader 锁导致多实例重复备份的问题
- 修复分组平台变更后渠道缓存未失效,导致定价/模型映射/白名单最长滞后 10 分钟的问题
- 修复渠道定价冲突检测与定价缓存 key 归一化不一致,导致同名价卡静默覆盖的问题
- 修复 Responses 探测在响应未跑完(截断/失败)时误判为「上游不支持」,导致长期走 Chat 转换、缓存命中率暴跌的问题
- 修复 Realtime 音频计费标志位求值顺序错误,导致所有会话漏计的问题
- 修复未登记的 Grok 文本模型在闭集价卡上 fail-closed、请求成功而用量记 0 的问题
- 修复长上下文定价迁移默认值为 false 导致存量分组静默丢失 ≥200k 阶梯的问题
- 修复账号徽章读取错误的快照字段、增量刷新不比较 Grok 快照导致档位更新后不替换的问题



---

## 📥 Installation

**Docker:**
```bash
# Docker Hub
docker pull weishaw/sub2api:0.1.176

# GitHub Container Registry
docker pull ghcr.io/wei-shaw/sub2api:0.1.176
```

**One-line install (Linux):**
```bash
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash
```

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

## 📚 Documentation

- [GitHub Repository](https://github.com/Wei-Shaw/sub2api)
- [Installation Guide](https://github.com/Wei-Shaw/sub2api/blob/main/deploy/README.md)