codex: remove client-name checks from core (#15181)

This commit is contained in:
Eric Traut
2026-03-19 11:20:26 -06:00
parent 9b6bc8f46a
commit fa0c563981
2 changed files with 1 additions and 25 deletions
+1 -15
View File
@@ -6370,21 +6370,7 @@ pub(crate) async fn built_tools(
accessible_connectors.as_slice(),
)
.await
.map(|discoverable_tools| {
if turn_context.app_server_client_name.as_deref() != Some("codex-tui") {
return discoverable_tools;
}
discoverable_tools
.into_iter()
.filter(|tool| {
!matches!(
tool,
crate::tools::discoverable::DiscoverableTool::Plugin(_)
)
})
.collect()
}) {
{
Ok(discoverable_tools) if discoverable_tools.is_empty() => None,
Ok(discoverable_tools) => Some(discoverable_tools),
Err(err) => {
@@ -115,16 +115,6 @@ impl ToolHandler for ToolSuggestHandler {
&accessible_connectors,
)
.await
.map(|discoverable_tools| {
if turn.app_server_client_name.as_deref() != Some("codex-tui") {
return discoverable_tools;
}
discoverable_tools
.into_iter()
.filter(|tool| !matches!(tool, DiscoverableTool::Plugin(_)))
.collect()
})
.map_err(|err| {
FunctionCallError::RespondToModel(format!(
"tool suggestions are unavailable right now: {err}"