fix(filters): migrate is_copilot_model matching to body['features']
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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__,
|
||||
|
||||
Reference in New Issue
Block a user