feat(system-settings): add user token limit configuration section (#5678)

This commit is contained in:
RedwindA
2026-06-24 20:39:21 +08:00
committed by GitHub
parent 0b2cf43e7b
commit 5d943281b5
10 changed files with 266 additions and 0 deletions
@@ -19,6 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
import { RateLimitSection } from '../request-limits/rate-limit-section'
import { SensitiveWordsSection } from '../request-limits/sensitive-words-section'
import { SSRFSection } from '../request-limits/ssrf-section'
import { TokenLimitSection } from '../request-limits/token-limit-section'
import type { SecuritySettings } from '../types'
import { createSectionRegistry } from '../utils/section-registry'
@@ -77,6 +78,18 @@ const SECURITY_SECTIONS = [
/>
),
},
{
id: 'token-limits',
titleKey: 'Token Limits',
build: (settings: SecuritySettings) => (
<TokenLimitSection
defaultValues={{
'token_setting.max_user_tokens':
settings['token_setting.max_user_tokens'],
}}
/>
),
},
] as const
export type SecuritySectionId = (typeof SECURITY_SECTIONS)[number]['id']