mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 15:38:22 +08:00
Add MarkResponseCommitted to 7 error-writing helper functions and 4 early-return branches in OpenAI handlers, plus 3 inline c.Data paths. Helper functions (1 line each, covers 60+ call sites): - writeGatewayCCError, writeResponsesError (Anthropic compat) - writeClaudeError, writeGoogleError (Gemini + Antigravity) - writeChatCompletionsError (Gemini Chat Completions compat) OpenAI handleErrorResponse/handleCompatErrorResponse: - passthrough rule and ShouldHandleErrorCode branches return before the existing MarkResponseCommitted, now each has its own Mark. Inline c.Data: Gemini ForwardNative (2) + Antigravity ForwardGemini (1).