From a79a10f86a9f819e77e320802501e8790d09aa6a Mon Sep 17 00:00:00 2001 From: faresobeid <111092724+faresobeid@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:39:23 +0000 Subject: [PATCH] feat(client): pass through by-handle payload segments --- renderers/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderers/client.py b/renderers/client.py index fd13e6d6..ad5ada3a 100644 --- a/renderers/client.py +++ b/renderers/client.py @@ -242,7 +242,7 @@ async def generate( Returns a dict with: request_id, prompt_ids, renderer_prompt_ids, mm_placeholders, completion_ids, completion_logprobs, content, reasoning_content, tool_calls, finish_reason, routed_experts, - multi_modal_data, prompt_attribution. ``renderer_prompt_ids`` is the + sampling_mask, payload, multi_modal_data, prompt_attribution. ``renderer_prompt_ids`` is the unexpanded logical prompt when ``process_multimodal=False`` and ``None`` otherwise. @@ -409,6 +409,9 @@ def _prepare(): "reasoning_complete": parsed.reasoning_complete, "routed_experts": routed_experts, "sampling_mask": sampling_mask, + # By-handle side arrays: segments of a shared payload file the inference + # server wrote instead of returning routed_experts / sampling_mask inline. + "payload": choice.get("payload"), # The mm sidecar consumed on the request side, surfaced back so # callers can persist it on the trajectory step for downstream # multi-turn bridging and training-sample construction.