github Wei-Shaw/sub2api v0.1.25
Sub2API 0.1.25

latest releases: v0.1.129, v0.1.128, v0.1.127...
4 months ago

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

  • Gemini OAuth 支持:完整的 Gemini OAuth 授权流程,支持 Code Assist 和 AI Studio 两种客户端类型

  • Gemini Messages API 兼容:自动将 Anthropic Messages API 格式转换为 Gemini API 格式

  • Gemini V1beta 路由:添加 /v1beta 路由支持原生 Gemini API 调用

  • OAuth 能力查询接口:前端可查询 OAuth 配置状态以动态显示选项

  • Gemini 账号测试:支持 Gemini 账号的双响应格式测试

  • 项目架构重构:采用单向依赖模式(Ports and Adapters),Handler 与内部模型通过 DTO 层隔离

  • Redis key 封装:统一封装 Redis key 生成函数,提升代码一致性和可测试性

  • 前端代码规范:统一 API、Views、Components 模块代码风格

  • 国际化完善:添加 Gemini 平台相关的中英文翻译

  • 修复非标准 SSE 格式解析问题,提升流式响应兼容性

  • 修复 docker-compose.yml 中 Redis 密码传递问题

  • 修复卸载脚本未删除安装锁文件导致无法重新安装的问题

  • 修复 Admin Handler 的 DTO 转换问题,解决 JSON 序列化异常

如需使用 AI Studio OAuth 功能,需要在 Google Cloud Console 创建 OAuth 客户端并发布为正式版本。详见 deploy/README.md。


📥 Installation

One-line install (Linux):

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

Don't miss a new sub2api release

NewReleases is sending notifications on new releases.