diff --git a/codex-rs/app-server/src/request_processors/plugins.rs b/codex-rs/app-server/src/request_processors/plugins.rs index c10da1c955..4220108217 100644 --- a/codex-rs/app-server/src/request_processors/plugins.rs +++ b/codex-rs/app-server/src/request_processors/plugins.rs @@ -863,43 +863,41 @@ impl PluginRequestProcessor { marketplace_load_errors.extend(suggestion_errors); } - if config.features.enabled(Feature::RemotePlugin) { - let remote_marketplaces = if let Some(remote_marketplaces) = - plugins_manager.remote_installed_marketplaces_from_cache() - { - Ok(remote_marketplaces) - } else { - let remote_plugin_service_config = RemotePluginServiceConfig { - chatgpt_base_url: config.chatgpt_base_url.clone(), - }; - plugins_manager - .fetch_and_cache_remote_installed_marketplaces( - &remote_plugin_service_config, - auth.as_ref(), - ) - .await + let remote_marketplaces = if let Some(remote_marketplaces) = + plugins_manager.remote_installed_marketplaces_from_cache() + { + Ok(remote_marketplaces) + } else { + let remote_plugin_service_config = RemotePluginServiceConfig { + chatgpt_base_url: config.chatgpt_base_url.clone(), }; + plugins_manager + .fetch_and_cache_remote_installed_marketplaces( + &remote_plugin_service_config, + auth.as_ref(), + ) + .await + }; - match remote_marketplaces { - Ok(remote_marketplaces) => { - for remote_marketplace in remote_marketplaces - .into_iter() - .map(remote_marketplace_to_info) - { - merge_plugin_marketplace_entry(&mut data, remote_marketplace); - } - } - Err( - RemotePluginCatalogError::AuthRequired - | RemotePluginCatalogError::UnsupportedAuthMode, - ) => {} - Err(err) => { - warn!( - error = %err, - "plugin/installed remote installed plugin fetch failed; returning local marketplaces only" - ); + match remote_marketplaces { + Ok(remote_marketplaces) => { + for remote_marketplace in remote_marketplaces + .into_iter() + .map(remote_marketplace_to_info) + { + merge_plugin_marketplace_entry(&mut data, remote_marketplace); } } + Err( + RemotePluginCatalogError::AuthRequired + | RemotePluginCatalogError::UnsupportedAuthMode, + ) => {} + Err(err) => { + warn!( + error = %err, + "plugin/installed remote installed plugin fetch failed; returning local marketplaces only" + ); + } } Ok(PluginInstalledResponse { diff --git a/codex-rs/app-server/tests/suite/v2/plugin_list.rs b/codex-rs/app-server/tests/suite/v2/plugin_list.rs index 74268d12dd..298b446722 100644 --- a/codex-rs/app-server/tests/suite/v2/plugin_list.rs +++ b/codex-rs/app-server/tests/suite/v2/plugin_list.rs @@ -1805,7 +1805,7 @@ async fn plugin_list_does_not_append_global_remote_when_marketplace_kinds_are_ex async fn plugin_installed_falls_back_to_remote_installed_and_caches_response() -> Result<()> { let codex_home = TempDir::new()?; let server = MockServer::start().await; - write_remote_plugin_catalog_config( + write_plugins_enabled_config_with_base_url( codex_home.path(), &format!("{}/backend-api/", server.uri()), )?;