mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Allow cached catalogs to satisfy MCP startup readiness (#47935)
## Why Required MCP servers can block startup while establishing a live connection even when a usable tool catalog is already cached. ## What changed - Add per-server `startup_readiness = "catalog"` to expose cached tools while the connection starts, retaining `"connection"` as the default. - Allow an eligible cached catalog to satisfy required-server startup validation and model binding capture. Explicit server or plugin requirements still wait for a live connection, and tool execution still requires the current connection. - Check tool filters and model visibility when accepting cached catalogs, and preserve cached catalog revisions for binding reuse. - Serialize the new setting, expose it in the configuration schema, and trace startup readiness at validation and model binding gates. GitOrigin-RevId: a1cbdf1757ebb5824cffe2cc56408be49711c422
This commit is contained in:
@@ -417,12 +417,13 @@ impl McpRuntime {
|
||||
required_servers: &[String],
|
||||
required_plugins: &HashSet<String>,
|
||||
) -> Option<Arc<McpBinding>> {
|
||||
Self::binding_from_published_runtime(
|
||||
self.current.load_full(),
|
||||
let current = self.current.load_full();
|
||||
current.connections.record_startup_readiness(
|
||||
"model_binding",
|
||||
required_servers,
|
||||
required_plugins,
|
||||
)
|
||||
.await
|
||||
);
|
||||
Self::binding_from_published_runtime(current, required_servers, required_plugins).await
|
||||
}
|
||||
|
||||
async fn binding_from_published_runtime(
|
||||
@@ -948,6 +949,7 @@ mod tests {
|
||||
environment_id: environment_id.to_string(),
|
||||
enabled: true,
|
||||
required: false,
|
||||
startup_readiness: Default::default(),
|
||||
supports_parallel_tool_calls: false,
|
||||
omit_tools_from: None,
|
||||
disabled_reason: None,
|
||||
|
||||
Reference in New Issue
Block a user