mirror of
https://github.com/openai/codex.git
synced 2026-11-24 15:21:20 +00:00
Remove WebSocket transport from code-mode hosts (#40692)
## What changed - Accept only `http://` and `https://` gRPC endpoints for app server `--code-mode-host` connections. - Limit the standalone code-mode host to stdio and gRPC listeners. - Remove the WebSocket session provider, dual-WebSocket negotiation, transport lanes, and related dependencies and tests. - Keep coverage for shared and prewarmed gRPC hosts and reject WebSocket host URLs in CLI parsing tests. GitOrigin-RevId: 8792604e79ffd54ce776074a4dc3f7d55e63752a
This commit is contained in:
1 parent
9be8d6e1c3
commit
725b3a44f8
31 files changed
+153
-2766
No files matched your search
@@ -4,7 +4,6 @@
|
||||
use codex_arg0::Arg0DispatchPaths;
|
||||
use codex_code_mode::CodeModeSessionProvider;
|
||||
use codex_code_mode::GrpcCodeModeSessionProvider;
|
||||
use codex_code_mode::WebSocketCodeModeSessionProvider;
|
||||
use codex_config::LoaderOverrides;
|
||||
use codex_config::NoopThreadConfigLoader;
|
||||
use codex_core::config::Config;
|
||||
@@ -552,20 +551,6 @@ pub async fn run_main_with_transport_options(
|
||||
let code_mode_session_provider: Option<Arc<dyn CodeModeSessionProvider>> =
|
||||
match &runtime_options.code_mode_host_transport {
|
||||
CodeModeHostTransport::Local => None,
|
||||
CodeModeHostTransport::WebSocket(url) => {
|
||||
if !config.features.enabled(Feature::CodeModeHost) {
|
||||
return Err(std::io::Error::new(
|
||||
ErrorKind::InvalidInput,
|
||||
"remote code-mode host requires the code_mode_host feature to be enabled",
|
||||
));
|
||||
}
|
||||
Some(Arc::new(
|
||||
WebSocketCodeModeSessionProvider::with_http_client_factory(
|
||||
url.to_string(),
|
||||
config.http_client_factory(),
|
||||
),
|
||||
))
|
||||
}
|
||||
CodeModeHostTransport::Grpc(url) => {
|
||||
if !config.features.enabled(Feature::CodeModeHost) {
|
||||
return Err(std::io::Error::new(
|
||||
|
||||
Reference in new issue
Block a user