@@ -268,6 +268,7 @@ const clientTabs = computed((): TabConfig[] => {
268268 case ' openai' :
269269 return [
270270 { id: ' codex' , label: t (' keys.useKeyModal.cliTabs.codexCli' ), icon: TerminalIcon },
271+ { id: ' codex-ws' , label: t (' keys.useKeyModal.cliTabs.codexCliWs' ), icon: TerminalIcon },
271272 { id: ' opencode' , label: t (' keys.useKeyModal.cliTabs.opencode' ), icon: TerminalIcon }
272273 ]
273274 case ' gemini' :
@@ -306,7 +307,7 @@ const showShellTabs = computed(() => activeClientTab.value !== 'opencode')
306307
307308const currentTabs = computed (() => {
308309 if (! showShellTabs .value ) return []
309- if (props . platform === ' openai ' ) {
310+ if (activeClientTab . value === ' codex ' || activeClientTab . value === ' codex-ws ' ) {
310311 return openaiTabs
311312 }
312313 return shellTabs
@@ -401,6 +402,9 @@ const currentFiles = computed((): FileConfig[] => {
401402
402403 switch (props .platform ) {
403404 case ' openai' :
405+ if (activeClientTab .value === ' codex-ws' ) {
406+ return generateOpenAIWsFiles (baseUrl , apiKey )
407+ }
404408 return generateOpenAIFiles (baseUrl , apiKey )
405409 case ' gemini' :
406410 return [generateGeminiCliContent (baseUrl , apiKey )]
@@ -524,6 +528,47 @@ requires_openai_auth = true`
524528 ]
525529}
526530
531+ function generateOpenAIWsFiles(baseUrl : string , apiKey : string ): FileConfig [] {
532+ const isWindows = activeTab .value === ' windows'
533+ const configDir = isWindows ? ' %userprofile%\\ .codex' : ' ~/.codex'
534+
535+ // config.toml content with WebSocket v2
536+ const configContent = ` model_provider = "sub2api"
537+ model = "gpt-5.3-codex"
538+ model_reasoning_effort = "high"
539+ network_access = "enabled"
540+ disable_response_storage = true
541+ windows_wsl_setup_acknowledged = true
542+ model_verbosity = "high"
543+
544+ [model_providers.sub2api]
545+ name = "sub2api"
546+ base_url = "${baseUrl }"
547+ wire_api = "responses"
548+ supports_websockets = true
549+ requires_openai_auth = true
550+
551+ [features]
552+ responses_websockets_v2 = true `
553+
554+ // auth.json content
555+ const authContent = ` {
556+ "OPENAI_API_KEY": "${apiKey }"
557+ } `
558+
559+ return [
560+ {
561+ path: ` ${configDir }/config.toml ` ,
562+ content: configContent ,
563+ hint: t (' keys.useKeyModal.openai.configTomlHint' )
564+ },
565+ {
566+ path: ` ${configDir }/auth.json ` ,
567+ content: authContent
568+ }
569+ ]
570+ }
571+
527572function generateOpenCodeConfig(platform : string , baseUrl : string , apiKey : string , pathLabel ? : string ): FileConfig {
528573 const provider: Record <string , any > = {
529574 [platform ]: {
0 commit comments