mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-14 12:02:27 +08:00
fix(grok): enable Codex Responses WebSocket v2
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user