mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
revert: completely remove all Sora functionality
Remove ALL Sora code — client, gateway, generation, S3 storage, accounts, media, SDK, quota, scheduling, billing, OAuth, settings, and frontend UI. Backend: 60+ files deleted/cleaned, including service layer (scheduling, billing, token provider), handler layer (client/gateway handlers, DTOs), repository layer (sora repos), config, wire DI, routes, domain constants. Frontend: 14 files deleted + 29 files cleaned, including components, views, API clients, composables, i18n keys, types, router entries. Cloudflare challenge detection migrated from soraerror to httputil package. Migration files retained (046/047/063/070) to preserve DB migration history. 136 files changed, ~24,300 lines removed. All tests pass.
This commit is contained in:
1 parent
60d84d621c
commit
dece8987e9
136 files changed
+210
-24127
No files matched your search
@@ -31,7 +31,7 @@ const (
|
||||
// ──────────────────────────────────────────────────────────
|
||||
|
||||
// NormalizeInboundEndpoint maps a raw request path (which may carry
|
||||
// prefixes like /antigravity, /openai, /sora) to its canonical form.
|
||||
// prefixes like /antigravity, /openai) to its canonical form.
|
||||
//
|
||||
// "/antigravity/v1/messages" → "/v1/messages"
|
||||
// "/v1/chat/completions" → "/v1/chat/completions"
|
||||
@@ -61,7 +61,7 @@ func NormalizeInboundEndpoint(path string) string {
|
||||
// such as /v1/responses/compact preserved from the raw URL).
|
||||
// - Anthropic → /v1/messages
|
||||
// - Gemini → /v1beta/models
|
||||
// - Sora → /v1/chat/completions
|
||||
// - Antigravity → /v1/messages (Claude) or gemini (Gemini)
|
||||
// - Antigravity routes may target either Claude or Gemini, so the
|
||||
// inbound endpoint is used to distinguish.
|
||||
func DeriveUpstreamEndpoint(inbound, rawRequestPath, platform string) string {
|
||||
@@ -82,9 +82,6 @@ func DeriveUpstreamEndpoint(inbound, rawRequestPath, platform string) string {
|
||||
case service.PlatformGemini:
|
||||
return EndpointGeminiModels
|
||||
|
||||
case service.PlatformSora:
|
||||
return EndpointChatCompletions
|
||||
|
||||
case service.PlatformAntigravity:
|
||||
// Antigravity accounts serve both Claude and Gemini.
|
||||
if inbound == EndpointGeminiModels {
|
||||
|
||||
Reference in new issue
Block a user