Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.
Rust
fix(libsy): classify codex apply_patch as an edit signal (#558)
ryan-lempka2c7cbfa74541
diff --git a/crates/libsy/src/algorithms/util/tool_signals.rs b/crates/libsy/src/algorithms/util/tool_signals.rsindex a974184f7..9996ff3a9 100644--- a/crates/libsy/src/algorithms/util/tool_signals.rs+++ b/crates/libsy/src/algorithms/util/tool_signals.rs@@ -100,6 +100,7 @@ static EDIT_TOOL_NAMES: &[&str] = &["notebookedit","str_replace","str_replace_based_edit_tool",+ "apply_patch", // codex's edit tool"text_editor","patch", // hermes's str_replace-style edit tool];@@ -797,6 +798,14 @@ mod tests {assert_eq!(sig.recent_edit_count, 1);}+ #[test]+ fn codex_apply_patch_counts_as_an_edit() {+ let request = with_messages(vec![tc("apply_patch"), tr("Success. Updated the file")]);+ let sig = ToolSignals::from_request(&request, None);+ assert_eq!(sig.edit_count, 1);+ assert_eq!(sig.recent_edit_count, 1);+ }+#[test]fn recent_window_size_is_caller_overridable() {// Same six tool calls (1 edit at the end, 5 writes before).