refactor: drop strip_routed_experts_data wrapper

Both base64 splices call _strip_base64_field directly now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
fares
2026-07-13 18:36:45 +00:00
co-authored by Claude Fable 5
parent 0d104d82e3
commit b6635d261c
+1 -5
View File
@@ -139,12 +139,8 @@ def _strip_base64_field(raw: bytes, prefix: bytes) -> tuple[bytes, memoryview |
return stripped, data
def strip_routed_experts_data(raw: bytes) -> tuple[bytes, memoryview | None]:
return _strip_base64_field(raw, ROUTED_EXPERTS_DATA_PREFIX)
def parse_generate_response(raw: bytes) -> dict[str, Any]:
stripped, routed_data = strip_routed_experts_data(raw)
stripped, routed_data = _strip_base64_field(raw, ROUTED_EXPERTS_DATA_PREFIX)
stripped, kept_ids_data = _strip_base64_field(stripped, KEPT_TOKENS_IDS_PREFIX)
payload: dict[str, Any] = json.loads(stripped)
if routed_data is not None: