docs(ui): 区分 OpenAI WS 开关与连接模式说明

This commit is contained in:
xlplbo committed 2026-09-12 16:54:22 +08:00
1 parent 5d5b395d00
commit db15ddf07f
6 files changed
+28 -6

No files matched your search

@@ -873,7 +873,11 @@
<p class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeDesc') }}
</p>
<p class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeRoutingDesc') }}
</p>
<p v-if="openAIWSModeHintKey" class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeHintPrefix') }}
{{ t(openAIWSModeHintKey) }}
</p>
<Select
@@ -1151,7 +1155,11 @@
<p class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeDesc') }}
</p>
<p class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeRoutingDesc') }}
</p>
<p v-if="openAIAPIKeyWSModeHintKey" class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeHintPrefix') }}
{{ t(openAIAPIKeyWSModeHintKey) }}
</p>
<Select
@@ -3132,7 +3132,11 @@
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeDesc') }}
</p>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeRoutingDesc') }}
</p>
<p v-if="openAIWSModeHintKey" class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeHintPrefix') }}
{{ t(openAIWSModeHintKey) }}
</p>
</div>
@@ -1871,7 +1871,11 @@
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeDesc') }}
</p>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeRoutingDesc') }}
</p>
<p v-if="openAIWSModeHintKey" class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.openai.wsModeHintPrefix') }}
{{ t(openAIWSModeHintKey) }}
</p>
</div>
@@ -5,9 +5,9 @@ import zh from '../locales/zh/admin/accounts'
describe('OpenAI WS mode locale descriptions', () => {
it('documents the global v2 router requirement for account WS modes', () => {
expect(zh.accounts.openai.wsModeDesc).toContain('mode_router_v2_enabled')
expect(zh.accounts.openai.wsModeDesc).toContain('http_bridge')
expect(en.accounts.openai.wsModeDesc).toContain('mode_router_v2_enabled')
expect(en.accounts.openai.wsModeDesc).toContain('http_bridge')
expect(zh.accounts.openai.wsModeRoutingDesc).toContain('mode_router_v2_enabled')
expect(zh.accounts.openai.wsModeRoutingDesc).toContain('http_bridge')
expect(en.accounts.openai.wsModeRoutingDesc).toContain('mode_router_v2_enabled')
expect(en.accounts.openai.wsModeRoutingDesc).toContain('http_bridge')
})
})
@@ -605,7 +605,10 @@ export default {
'Disabled by default. Enable to allow responses_websockets_v2 capability (still gated by global and account-type switches).',
wsMode: 'WS mode',
wsModeDesc:
'Only applies to the current OpenAI account type; account WS modes, including http_bridge, take effect only when the global gateway.openai_ws.mode_router_v2_enabled=true.',
'Account WS switch: select Off to disable WS for this account, or another option to enable it. Availability still depends on the other gateway WS switches.',
wsModeRoutingDesc:
'Connection mode: when gateway.openai_ws.mode_router_v2_enabled=true, the selected mode applies, including http_bridge. When false (the default), all three modes use the legacy context pool whenever WS is allowed.',
wsModeHintPrefix: 'Connection behavior when the selected mode takes effect:',
wsModeOff: 'Off (off)',
wsModeCtxPool: 'Context Pool (ctx_pool)',
wsModePassthrough: 'Passthrough (passthrough)',
@@ -691,7 +691,10 @@ export default {
'默认关闭。开启后可启用 responses_websockets_v2 协议能力(受网关全局开关与账号类型开关约束)。',
wsMode: 'WS mode',
wsModeDesc:
'仅对当前 OpenAI 账号类型生效;包括 http_bridge 在内的账号 WS mode 仅在全局 gateway.openai_ws.mode_router_v2_enabled=true 时生效。',
'账号 WS 开关:选择“关闭”可禁用本账号的 WS;选择其他选项则启用,实际是否可用仍受网关其他 WS 开关限制。',
wsModeRoutingDesc:
'连接方式:全局 gateway.openai_ws.mode_router_v2_enabled=true 时,按所选模式(包括 http_bridge)连接;为 false(默认)时,不区分这三种模式,允许 WS 时统一使用旧版上下文池。',
wsModeHintPrefix: '所选模式生效后的连接方式:',
wsModeOff: '关闭(off)',
wsModeCtxPool: '上下文池(ctx_pool)',
wsModePassthrough: '透传(passthrough)',