From cdc8ec065e224c74683cf3a134772e64fb0c0c63 Mon Sep 17 00:00:00 2001 From: Eric Ning Date: Sat, 6 Jun 2026 14:03:00 -0700 Subject: [PATCH] fix(core-plugins): send Codex product SKU to plugin-service (#26804) --- codex-rs/app-server/tests/suite/v2/plugin_list.rs | 4 ++++ codex-rs/core-plugins/src/remote.rs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 49ad3c418..d9a0a0049 100644 --- a/codex-rs/app-server/tests/suite/v2/plugin_list.rs +++ b/codex-rs/app-server/tests/suite/v2/plugin_list.rs @@ -1723,6 +1723,7 @@ async fn plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled() - .and(query_param("limit", "200")) .and(header("authorization", "Bearer chatgpt-token")) .and(header("chatgpt-account-id", "account-123")) + .and(header("oai-product-sku", "codex")) .respond_with(ResponseTemplate::new(200).set_body_string(global_directory_body)) .mount(&server) .await; @@ -1732,6 +1733,7 @@ async fn plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled() - .and(query_param("limit", "200")) .and(header("authorization", "Bearer chatgpt-token")) .and(header("chatgpt-account-id", "account-123")) + .and(header("oai-product-sku", "codex")) .respond_with(ResponseTemplate::new(200).set_body_string(empty_page_body)) .mount(&server) .await; @@ -1740,6 +1742,7 @@ async fn plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled() - .and(query_param("scope", "GLOBAL")) .and(header("authorization", "Bearer chatgpt-token")) .and(header("chatgpt-account-id", "account-123")) + .and(header("oai-product-sku", "codex")) .respond_with(ResponseTemplate::new(200).set_body_string(global_installed_body)) .mount(&server) .await; @@ -1748,6 +1751,7 @@ async fn plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled() - .and(query_param("scope", "WORKSPACE")) .and(header("authorization", "Bearer chatgpt-token")) .and(header("chatgpt-account-id", "account-123")) + .and(header("oai-product-sku", "codex")) .respond_with(ResponseTemplate::new(200).set_body_string(empty_page_body)) .mount(&server) .await; diff --git a/codex-rs/core-plugins/src/remote.rs b/codex-rs/core-plugins/src/remote.rs index 7daf1da31..b96746b63 100644 --- a/codex-rs/core-plugins/src/remote.rs +++ b/codex-rs/core-plugins/src/remote.rs @@ -64,6 +64,8 @@ pub const REMOTE_WORKSPACE_SHARED_WITH_ME_UNLISTED_MARKETPLACE_DISPLAY_NAME: &st "Shared with me (unlisted)"; const OPENAI_CURATED_REMOTE_COLLECTION_KEY: &str = "vertical"; +const OAI_PRODUCT_SKU_HEADER: &str = "OAI-Product-Sku"; +const CODEX_PRODUCT_SKU: &str = "codex"; const REMOTE_PLUGIN_CATALOG_TIMEOUT: Duration = Duration::from_secs(30); const REMOTE_PLUGIN_LIST_PAGE_LIMIT: u32 = 200; const MAX_REMOTE_DEFAULT_PROMPT_COUNT: usize = 3; @@ -1591,7 +1593,8 @@ fn authenticated_request( ) -> Result { Ok(request .timeout(REMOTE_PLUGIN_CATALOG_TIMEOUT) - .headers(codex_model_provider::auth_provider_from_auth(auth).to_auth_headers())) + .headers(codex_model_provider::auth_provider_from_auth(auth).to_auth_headers()) + .header(OAI_PRODUCT_SKU_HEADER, CODEX_PRODUCT_SKU)) } async fn send_and_decode Deserialize<'de>>(