feat: add RPM types and i18n translations
This commit is contained in:
@@ -1613,7 +1613,12 @@ export default {
|
|||||||
sessions: {
|
sessions: {
|
||||||
full: 'Active sessions full, new sessions must wait (idle timeout: {idle} min)',
|
full: 'Active sessions full, new sessions must wait (idle timeout: {idle} min)',
|
||||||
normal: 'Active sessions normal (idle timeout: {idle} min)'
|
normal: 'Active sessions normal (idle timeout: {idle} min)'
|
||||||
}
|
},
|
||||||
|
rpm: {
|
||||||
|
full: 'RPM limit reached',
|
||||||
|
warning: 'RPM approaching limit',
|
||||||
|
normal: 'RPM normal',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
tempUnschedulable: {
|
tempUnschedulable: {
|
||||||
title: 'Temp Unschedulable',
|
title: 'Temp Unschedulable',
|
||||||
@@ -1828,6 +1833,17 @@ export default {
|
|||||||
idleTimeoutPlaceholder: '5',
|
idleTimeoutPlaceholder: '5',
|
||||||
idleTimeoutHint: 'Sessions will be released after idle timeout'
|
idleTimeoutHint: 'Sessions will be released after idle timeout'
|
||||||
},
|
},
|
||||||
|
rpmLimit: {
|
||||||
|
label: 'RPM Limit',
|
||||||
|
hint: 'Limit requests per minute to protect upstream accounts',
|
||||||
|
baseRpm: 'Base RPM',
|
||||||
|
baseRpmPlaceholder: '15',
|
||||||
|
baseRpmHint: 'Max requests per minute, 0 or empty means no limit',
|
||||||
|
strategy: 'RPM Strategy',
|
||||||
|
strategyTiered: 'Tiered Model',
|
||||||
|
strategyStickyExempt: 'Sticky Exempt',
|
||||||
|
strategyHint: 'Tiered: gradually restrict when exceeded; Sticky Exempt: existing sessions unrestricted',
|
||||||
|
},
|
||||||
tlsFingerprint: {
|
tlsFingerprint: {
|
||||||
label: 'TLS Fingerprint Simulation',
|
label: 'TLS Fingerprint Simulation',
|
||||||
hint: 'Simulate Node.js/Claude Code client TLS fingerprint'
|
hint: 'Simulate Node.js/Claude Code client TLS fingerprint'
|
||||||
|
|||||||
@@ -1664,7 +1664,12 @@ export default {
|
|||||||
sessions: {
|
sessions: {
|
||||||
full: '活跃会话已满,新会话需等待(空闲超时:{idle}分钟)',
|
full: '活跃会话已满,新会话需等待(空闲超时:{idle}分钟)',
|
||||||
normal: '活跃会话正常(空闲超时:{idle}分钟)'
|
normal: '活跃会话正常(空闲超时:{idle}分钟)'
|
||||||
}
|
},
|
||||||
|
rpm: {
|
||||||
|
full: '已达 RPM 上限',
|
||||||
|
warning: 'RPM 接近上限',
|
||||||
|
normal: 'RPM 正常',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
clearRateLimit: '清除速率限制',
|
clearRateLimit: '清除速率限制',
|
||||||
testConnection: '测试连接',
|
testConnection: '测试连接',
|
||||||
@@ -1971,6 +1976,17 @@ export default {
|
|||||||
idleTimeoutPlaceholder: '5',
|
idleTimeoutPlaceholder: '5',
|
||||||
idleTimeoutHint: '会话空闲超时后自动释放'
|
idleTimeoutHint: '会话空闲超时后自动释放'
|
||||||
},
|
},
|
||||||
|
rpmLimit: {
|
||||||
|
label: 'RPM 限制',
|
||||||
|
hint: '限制每分钟请求数量,保护上游账号',
|
||||||
|
baseRpm: '基础 RPM',
|
||||||
|
baseRpmPlaceholder: '15',
|
||||||
|
baseRpmHint: '每分钟最大请求数,0 或留空表示不限制',
|
||||||
|
strategy: 'RPM 策略',
|
||||||
|
strategyTiered: '三区模型',
|
||||||
|
strategyStickyExempt: '粘性豁免',
|
||||||
|
strategyHint: '三区模型: 超限后逐步限制; 粘性豁免: 已有会话不受限',
|
||||||
|
},
|
||||||
tlsFingerprint: {
|
tlsFingerprint: {
|
||||||
label: 'TLS 指纹模拟',
|
label: 'TLS 指纹模拟',
|
||||||
hint: '模拟 Node.js/Claude Code 客户端的 TLS 指纹'
|
hint: '模拟 Node.js/Claude Code 客户端的 TLS 指纹'
|
||||||
|
|||||||
@@ -661,6 +661,11 @@ export interface Account {
|
|||||||
max_sessions?: number | null
|
max_sessions?: number | null
|
||||||
session_idle_timeout_minutes?: number | null
|
session_idle_timeout_minutes?: number | null
|
||||||
|
|
||||||
|
// RPM 限制(仅 Anthropic OAuth/SetupToken 账号有效)
|
||||||
|
base_rpm?: number | null
|
||||||
|
rpm_strategy?: string | null
|
||||||
|
rpm_sticky_buffer?: number | null
|
||||||
|
|
||||||
// TLS指纹伪装(仅 Anthropic OAuth/SetupToken 账号有效)
|
// TLS指纹伪装(仅 Anthropic OAuth/SetupToken 账号有效)
|
||||||
enable_tls_fingerprint?: boolean | null
|
enable_tls_fingerprint?: boolean | null
|
||||||
|
|
||||||
@@ -675,6 +680,7 @@ export interface Account {
|
|||||||
// 运行时状态(仅当启用对应限制时返回)
|
// 运行时状态(仅当启用对应限制时返回)
|
||||||
current_window_cost?: number | null // 当前窗口费用
|
current_window_cost?: number | null // 当前窗口费用
|
||||||
active_sessions?: number | null // 当前活跃会话数
|
active_sessions?: number | null // 当前活跃会话数
|
||||||
|
current_rpm?: number | null // 当前分钟 RPM 计数
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account Usage types
|
// Account Usage types
|
||||||
|
|||||||
Reference in New Issue
Block a user