From 8b3f44b8e057597a7cdf28e49ef5c56e2894e57b Mon Sep 17 00:00:00 2001 From: fujie Date: Sat, 21 Mar 2026 15:27:15 +0800 Subject: [PATCH] fix(filters): migrate is_copilot_model matching to body['features'] --- .../async-context-compression/async_context_compression.py | 6 +++++- .../github_copilot_sdk_files_filter.py | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/filters/async-context-compression/async_context_compression.py b/plugins/filters/async-context-compression/async_context_compression.py index 934e86d..e05a4b8 100644 --- a/plugins/filters/async-context-compression/async_context_compression.py +++ b/plugins/filters/async-context-compression/async_context_compression.py @@ -2713,7 +2713,11 @@ class Filter: Check if compression should be skipped. Returns True if: """ - is_copilot = body.get("is_copilot_model", False) or body.get("metadata", {}).get("is_copilot_model", False) + is_copilot = ( + body.get("is_copilot_model", False) + or body.get("metadata", {}).get("is_copilot_model", False) + or body.get("features", {}).get("is_copilot_model", False) + ) if is_copilot: return True diff --git a/plugins/filters/github_copilot_sdk_files_filter/github_copilot_sdk_files_filter.py b/plugins/filters/github_copilot_sdk_files_filter/github_copilot_sdk_files_filter.py index 17d4991..21c9cc3 100644 --- a/plugins/filters/github_copilot_sdk_files_filter/github_copilot_sdk_files_filter.py +++ b/plugins/filters/github_copilot_sdk_files_filter/github_copilot_sdk_files_filter.py @@ -119,9 +119,9 @@ class Filter: # Check if it's a Copilot model is_copilot_model = self._is_copilot_model(current_model) - if "metadata" not in body: - body["metadata"] = {} - body["metadata"]["is_copilot_model"] = is_copilot_model + if "features" not in body: + body["features"] = {} + body["features"]["is_copilot_model"] = is_copilot_model await self._emit_debug_log( __event_emitter__,