feat(gateway): harden failover and payload handling

Retry pre-response transport failures across candidates with an explicit stop policy, and propagate end-to-end timing into usage records and UI diagnostics.

Remove legacy body, import, cookie, PII, and tunnel replay caps while preserving optional operator-configured gateway limits.
This commit is contained in:
elky
2026-07-30 01:03:27 +08:00
parent a97acc07fc
commit a04673a90d
80 changed files with 3640 additions and 1236 deletions
+2 -9
View File
@@ -1412,6 +1412,7 @@ const legacyExactEnglishMessages: Record<string, string> = {
'默认 2': 'Default 2',
'最大转移次数': 'Max transfers',
'最大转移超时': 'Max transfer timeout',
'0 (不限制)': '0 (unlimited)',
'流式首字节超时': 'Streaming first-byte timeout',
'非流式请求超时': 'Non-streaming request timeout',
'(秒)': '(seconds)',
@@ -2409,12 +2410,8 @@ const legacyPhraseEnglishMessages: Array<[string, string]> = [
['记录详细程度', 'Record detail level'],
['BASIC - 基本信息 (~1KB/条)', 'BASIC - basic information (~1KB/item)'],
['HEADERS - 含请求头 (~2-3KB/条)', 'HEADERS - includes request headers (~2-3KB/item)'],
['FULL - 完整请求响应 (~50KB/条)', 'FULL - full request and response (~50KB/item)'],
['FULL - 完整请求响应', 'FULL - full request and response'],
['敏感信息会自动脱敏', 'Sensitive information is automatically redacted'],
['最大请求体大小 (KB)', 'Maximum request body size (KB)'],
['超过此大小的请求体将被截断记录', 'Request bodies larger than this are truncated in records'],
['最大响应体大小 (KB)', 'Maximum response body size (KB)'],
['超过此大小的响应体将被截断记录', 'Response bodies larger than this are truncated in records'],
['敏感请求头', 'Sensitive request headers'],
['逗号分隔,这些请求头会被脱敏处理', 'Comma-separated request headers that will be redacted'],
['0 表示默认不限制;未单独配置的用户和独立 Key 会跟随这里', '0 means no default limit. Users and standalone keys without separate configuration follow this setting.'],
@@ -2750,10 +2747,6 @@ const legacyFallbackTokens: Array<[string, string]> = [
['完整请求响应', 'full request and response'],
['自动脱敏', 'automatically redacted'],
['脱敏', 'redacted'],
['最大请求体', 'maximum request body'],
['最大响应体', 'maximum response body'],
['超过此大小', 'larger than this'],
['截断记录', 'truncated in records'],
['逗号分隔', 'comma-separated'],
['这些请求头', 'these request headers'],
['脱敏处理', 'redacted'],