mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Route Codex Apps MCP through plugin service (#34389)
## What changed - Point the default Codex Apps MCP server at `ps/mcp` instead of the legacy Apps endpoint for both `backend-api` and `api/codex` base URLs. - Use the same server configuration for Codex Apps and the hosted plugin runtime. - Update MCP integration tests and test-server routing to expect the plugin-service path. GitOrigin-RevId: 939f20dcff67ba6f79c11b328bfc624b25e3aac2
This commit is contained in:
1 parent
5a4f5ee64c
commit
6bf4845b60
6 files changed
+24
-37
No files matched your search
@@ -475,14 +475,12 @@ fn normalize_codex_apps_base_url(base_url: &str) -> String {
|
||||
|
||||
fn codex_apps_mcp_url_for_base_url(base_url: &str) -> String {
|
||||
let base_url = normalize_codex_apps_base_url(base_url);
|
||||
let (base_url, default_path) = if base_url.contains("/backend-api") {
|
||||
(base_url, "wham/apps")
|
||||
} else if base_url.contains("/api/codex") {
|
||||
(base_url, "apps")
|
||||
let base_url = if base_url.contains("/backend-api") || base_url.contains("/api/codex") {
|
||||
base_url
|
||||
} else {
|
||||
(format!("{base_url}/api/codex"), "apps")
|
||||
format!("{base_url}/api/codex")
|
||||
};
|
||||
format!("{base_url}/{default_path}")
|
||||
format!("{base_url}/ps/mcp")
|
||||
}
|
||||
|
||||
pub fn codex_apps_mcp_server_config(
|
||||
@@ -504,18 +502,7 @@ pub fn hosted_plugin_runtime_mcp_server_config(
|
||||
apps_mcp_product_sku: Option<&str>,
|
||||
originator: Option<&str>,
|
||||
) -> McpServerConfig {
|
||||
let base_url = normalize_codex_apps_base_url(chatgpt_base_url);
|
||||
let base_url = if base_url.contains("/backend-api") || base_url.contains("/api/codex") {
|
||||
base_url
|
||||
} else {
|
||||
format!("{base_url}/api/codex")
|
||||
};
|
||||
mcp_server_config_for_url(
|
||||
format!("{base_url}/ps/mcp"),
|
||||
apps_mcp_product_sku,
|
||||
originator,
|
||||
McpServerAuth::ChatGpt,
|
||||
)
|
||||
codex_apps_mcp_server_config(chatgpt_base_url, apps_mcp_product_sku, originator)
|
||||
}
|
||||
|
||||
fn mcp_server_config_for_url(
|
||||
|
||||
Reference in new issue
Block a user