{"record":{"id":"9377fe802742cd76","repo":"router-for-me/CLIProxyAPI","slug":"realtime-capability-not-supported","errorCode":"realtime_capability_not_supported","errorMessage":"Realtime session type is not supported by the Codex OAuth upstream: %q","messagePattern":"Realtime session type is not supported by the Codex OAuth upstream: %q","errorType":"http","errorClass":"errUnsupportedSessionType","httpStatus":501,"severity":"error","filePath":"internal/client/codex/live/client_secret.go","lineNumber":338,"sourceCode":"\treturn time.Duration(expiresAfter.Seconds) * time.Second, nil\n}\n\nfunc normalizeClientSecretSession(session json.RawMessage) (json.RawMessage, json.RawMessage, error) {\n\ttrimmedSession := strings.TrimSpace(string(session))\n\tif trimmedSession == \"\" || trimmedSession == \"null\" {\n\t\tsession = json.RawMessage(`{\"type\":\"realtime\",\"model\":\"gpt-realtime\"}`)\n\t}\n\tvar clientSession map[string]any\n\tif errUnmarshal := json.Unmarshal(session, &clientSession); errUnmarshal != nil || clientSession == nil {\n\t\treturn nil, nil, errors.New(\"session must be a valid JSON object\")\n\t}\n\tsessionType, _ := clientSession[\"type\"].(string)\n\tif strings.TrimSpace(sessionType) == \"\" {\n\t\tsessionType = \"realtime\"\n\t\tclientSession[\"type\"] = sessionType\n\t}\n\tif sessionType != \"realtime\" {\n\t\treturn nil, nil, fmt.Errorf(\"%w by the Codex OAuth upstream: %q\", errUnsupportedSessionType, sessionType)\n\t}\n\tmodel, _ := clientSession[\"model\"].(string)\n\tif strings.TrimSpace(model) == \"\" {\n\t\tmodel = \"gpt-realtime\"\n\t\tclientSession[\"model\"] = model\n\t}\n\tclientEncoded, errMarshal := json.Marshal(clientSession)\n\tif errMarshal != nil {\n\t\treturn nil, nil, fmt.Errorf(\"encode Realtime session: %w\", errMarshal)\n\t}\n\tclientSession[\"model\"] = codexRealtimeModel(model)\n\tupstreamEncoded, errMarshal := json.Marshal(clientSession)\n\tif errMarshal != nil {\n\t\treturn nil, nil, fmt.Errorf(\"encode Codex Realtime session: %w\", errMarshal)\n\t}\n\treturn clientEncoded, upstreamEncoded, nil\n}\n","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/client/codex/live/client_secret.go#L320-L356","documentation":"Error \"Realtime session type is not supported by the Codex OAuth upstream: %q\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/client/codex/live/client_secret.go:338 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a Realtime session type supported by the Codex OAuth upstream.","Remove or change the unsupported session type field in the request."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}