3 Commits

Author SHA1 Message Date
Luis Pater
5a351d9570 feat(antigravity): deactivate credentials on TOS_VIOLATION and add optional pool-wide protective pause
- Detect the 403 PERMISSION_DENIED ErrorInfo reason=TOS_VIOLATION signature and mark the credential StatusDisabled + Disabled so it is excluded from rotation and persisted across restarts, while OAuth refresh stays intact; carry appeal_url/appeal_url_link_text through Error.Metadata to auth.Metadata and the management API.
- Add an optional pool-wide protective pause (antigravity.tos-pause-window, default 6h) armed only by TOS results, never by transient 429s, covering all Antigravity request paths including SSE mid-stream error frames and CountTokens.
- Distinguish terminal TOS results from stale/superseded results using a new Result.RefreshToken account hint so a same-account OAuth refresh applies the suspension while a genuine credential replacement discards it safely.

Closes: #7515
2026-11-14 04:49:56 +08:00
Luis Pater
31f4cfab3f feat: migrate CLIProxyAPI to version 8 2026-09-27 14:42:26 +08:00
Luis Pater
09da52ad50 feat(translator): improve error handling and response conversion for incomplete statuses
- Enhanced response handling to support `response.incomplete` events across translator components and executors.
- Refactored `resultErrorFromError` to centralize error conversion and consolidate repeated logic for constructing custom errors.
- Updated handling of `max_output_tokens` and similar terminal reasons in OpenAI and Gemini translator workflows.
- Introduced `IsRequestScoped` and `IsRequestScopedError` to differentiate between request-scoped and non-request-scoped errors.
- Added comprehensive test cases for incomplete responses, terminal failures, and error propagation in both streaming and non-streaming conditions.

Closes: #3055
2026-07-16 04:38:19 +08:00