Remove remote catalog gate from installed plugins

This commit is contained in:
xli-oai
2026-05-15 02:11:08 -07:00
parent 1ff7845d67
commit d17ee5ec32
2 changed files with 32 additions and 34 deletions

View File

@@ -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 {

View File

@@ -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()),
)?;