From 174ea22eeb238b12d015e88c7b92faab218b4a8a Mon Sep 17 00:00:00 2001 From: superman2003 <2112076433zcr@gmail.com> Date: Thu, 16 Jul 2026 18:30:43 +0800 Subject: [PATCH] fix(grok): enable Codex Responses WebSocket v2 --- frontend/src/components/keys/UseKeyModal.vue | 6 +++++- frontend/src/components/keys/__tests__/UseKeyModal.spec.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/keys/UseKeyModal.vue b/frontend/src/components/keys/UseKeyModal.vue index 4663b2b7d8..e41d44f745 100644 --- a/frontend/src/components/keys/UseKeyModal.vue +++ b/frontend/src/components/keys/UseKeyModal.vue @@ -784,7 +784,11 @@ model_context_window = 1000000 name = "Sub2API Grok" base_url = "${baseUrl}" env_key = "SUB2API_API_KEY" -wire_api = "responses"` +wire_api = "responses" +supports_websockets = true + +[features] +responses_websockets_v2 = true` const environmentContent = isWindows ? `$env:SUB2API_API_KEY="${apiKey}"` : `export SUB2API_API_KEY="${apiKey}"` diff --git a/frontend/src/components/keys/__tests__/UseKeyModal.spec.ts b/frontend/src/components/keys/__tests__/UseKeyModal.spec.ts index 6db8505489..b147099eda 100644 --- a/frontend/src/components/keys/__tests__/UseKeyModal.spec.ts +++ b/frontend/src/components/keys/__tests__/UseKeyModal.spec.ts @@ -208,11 +208,12 @@ describe('UseKeyModal', () => { expect(configToml).toContain('base_url = "https://example.com/v1"') expect(configToml).toContain('env_key = "SUB2API_API_KEY"') expect(configToml).toContain('wire_api = "responses"') + expect(configToml).toContain('supports_websockets = true') expect(configToml).not.toContain('requires_openai_auth') expect(configToml).not.toContain('disable_response_storage') expect(configToml).not.toContain('network_access') expect(configToml).not.toContain('windows_wsl_setup_acknowledged') - expect(configToml).not.toContain('[features]') + expect(configToml).toContain('[features]\nresponses_websockets_v2 = true') expect(configToml).not.toContain('goals = true') expect(codeBlocks).toContain('export SUB2API_API_KEY="sk-grok-codex-test"') expect(wrapper.text()).not.toContain('auth.json')