fix(grok): enable Codex Responses WebSocket v2

This commit is contained in:
superman2003
2026-07-16 18:30:59 +08:00
parent b960ec1980
commit 174ea22eeb
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -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}"`
@@ -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')