Skip to content

Sub2API 0.1.130

Choose a tag to compare

@github-actions github-actions released this 26 Apr 03:16
· 4266 commits to main since this release

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

The previous hotfix solved ApplyPatch grammar loss but left the Cursor-specific passthrough cleanup implicit. This follow-up reorganizes chat normalization behind explicit profiles so the OpenAI Cursor path preserves Responses-shape tools while stripping Cursor-only fields before the request reaches the shared gateway.

The result is a clearer separation of responsibilities: Cursor compat owns Cursor protocol cleanup, and the main OpenAI forwarding path remains generic. Regression tests cover both the preserved custom grammar tool contract and the fact that the default chat normalization path does not inherit the OpenAI-only sanitizer.

Constraint: Cursor-specific request cleanup must not leak into the shared OpenAI gateway path
Rejected: Move unsupported-field stripping into OpenAIGatewayService | would spread Cursor-specific knowledge into the main forwarding layer
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Add future Cursor passthrough field filtering to the compat profile sanitizer, not to the shared service layer
Tested: go test ./internal/compat/cursor ./internal/pkg/apicompat ./internal/handler ./internal/service -run 'Cursor|Compat|OpenAI|ResponsesShape|ChatCompletions' -count=1; go vet ./internal/compat/cursor ./internal/pkg/apicompat ./internal/handler ./internal/service
Not-tested: Real Cursor desktop requests against a live upstream after this release


📥 Installation

Docker:

# GitHub Container Registry
docker pull ghcr.io/wanggang8/sub2api:0.1.130

One-line install (Linux):

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

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

📚 Documentation