v0.1.185

Wei-Shaw/sub2apiv0.1.185Sep 1, 2026by github-actions[bot]

AI Summary

This release enhances the AI API Gateway by upgrading pricing directories and implementing dynamic long-context billing. It also improves gateway compatibility and connection stability for Codex and OpenAI models.

Key Highlights

  • Added JSON patch support to override official price data via `pricing.override_file`.
  • Implemented dynamic long-context tiered pricing driven by the price directory.
  • Enhanced Codex and OpenAI gateway compatibility and connection stability.
  • Optimized account cost calculation and database startup stability.
  • Fixed WebSocket error code handling to prevent client session termination.

New Features

  • Price directory support for JSON patch overrides via `pricing.override_file`.
  • Long context tiered pricing driven by the price directory.
  • Codex fast model support for displaying priority service tier.

Full Release Notes

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

升级价格目录与长上下文计费体系,并增强 Codex/OpenAI 网关兼容性和连接稳定性。

## 新增功能

- 价格目录支持通过 `pricing.override_file` 使用 JSON 补丁覆盖官方价格数据。
- 长上下文阶梯计价改为由价格目录驱动,支持不同模型和渠道的动态定价策略。
- Codex 快速模型支持展示 priority service tier。

## 优化改进

- 优化账号统计成本计算,统一应用模型定价策略及 DeepSeek 峰谷价格。
- 优化数据库启动时的瞬时错误重试机制,提升服务启动稳定性。
- 优化 OpenAI WebSocket 连接池,自动回收过期空闲连接。
- 优化 Codex 模型能力目录,保留已知的图像输入能力。
- 优化 Gemini Pro 缓存写入价格及价格目录契约校验。

## Bug 修复

- 修复 API Key 请求被错误合成 instructions 的问题。
- 修复 Codex 模型目录中持续禁用账号仍被选中的问题。
- 修复 ctx_pool WebSocket 入口未改写上游容量降载错误码,避免客户端错误终止会话。
- 修复 OpenAI delegation bootstrap 缺少 call id 时无法正常处理的问题。



---

## 📥 Installation

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

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

**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)