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.
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -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__,
|
||||||
|
|||||||
Reference in New Issue
Block a user