fix(filters): migrate is_copilot_model matching to body['features']

This commit is contained in:
fujie
2026-03-21 15:27:15 +08:00
parent c520a6fd45
commit 8b3f44b8e0
2 changed files with 8 additions and 4 deletions

View File

@@ -2713,7 +2713,11 @@ class Filter:
Check if compression should be skipped. Check if compression should be skipped.
Returns True if: 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: if is_copilot:
return True return True

View File

@@ -119,9 +119,9 @@ class Filter:
# Check if it's a Copilot model # Check if it's a Copilot model
is_copilot_model = self._is_copilot_model(current_model) is_copilot_model = self._is_copilot_model(current_model)
if "metadata" not in body: if "features" not in body:
body["metadata"] = {} body["features"] = {}
body["metadata"]["is_copilot_model"] = is_copilot_model body["features"]["is_copilot_model"] = is_copilot_model
await self._emit_debug_log( await self._emit_debug_log(
__event_emitter__, __event_emitter__,