Keep multimodal content inline in v1 rollouts - #2417
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes established multimodal inference and rollout-training behavior across the client, token graph, and trace models rather than adding an isolated option. It also carries an unresolved compatibility risk in the inference call path, so the runtime contract should be reviewed before merging. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
| prompt_attribution=prompt_attribution, | ||
| tools=wire_tools, | ||
| sampling_params=sampling_params, | ||
| process_multimodal=process_multimodal, |
There was a problem hiding this comment.
🟠 High clients/train.py:435
Every TrainClient.get_response call raises TypeError before inference because the pinned renderers==0.1.10 generate() does not accept process_multimodal, including text-only requests. Remove this unsupported keyword (or upgrade the renderer dependency) so requests reach the inference endpoint.
- process_multimodal=process_multimodal,🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @verifiers/v1/clients/train.py around line 435:
Every `TrainClient.get_response` call raises `TypeError` before inference because the pinned `renderers==0.1.10` `generate()` does not accept `process_multimodal`, including text-only requests. Remove this unsupported keyword (or upgrade the renderer dependency) so requests reach the inference endpoint.
Summary
Stack
Validation
uv run --locked pytest -q tests/v1passed (live API-key tests skipped)Note
Keep multimodal content inline in v1 rollouts using
renderer_token_idsmulti_modal_datawith a parallelrenderer_token_idsstream onMessageNodeandTurnTokens, so multimodal content stays inline in the token flow rather than being passed as a separate blob._commit_turnin graph.py now validates that vLLM prompt tokens exactly extend the stored rollout prefix in both logical and renderer token spaces, raisingValueErroron mismatch. Nodes persist bothtoken_idsandrenderer_token_ids.TrainClient.get_responsein train.py bridges over the turn tail only, derivesrouted_experts_prompt_startfromturn.path_len, and passesprocess_multimodalto render/generate. Renderers withoutsupports_process_multimodalerror when multimodal processing is disabled.Branchin trace.py no longer exposes aggregatedmulti_modal_data;mm_token_type_idsis computed without node-level multimodal data.aiohttpdependency to>=3.14.1in pyproject.toml.multi_modal_datafromTurnTokens,MessageNode, andBranch; any out-of-tree code reading these fields will break._commit_turnnow raisesValueError('vLLM prompt tokens do not exactly extend the stored rollout prefix')on prefix mismatch where previously it did not.Macroscope summarized 9070ddd.
Note
Medium Risk
Changes rollout token identity, multimodal render/generate wiring, and strict prefix validation on turn commit—misaligned renderer/vLLM sequences will now fail rollouts instead of silently reusing stale prefixes.
Overview
Multimodal v1 rollouts no longer carry processed image tensors on nodes or turns.
TurnTokens.multi_modal_data,MessageNode.multi_modal_data, andBranch.multi_modal_dataare removed; images stay in message content while training uses the expanded vLLM prompt intoken_idsand a separate logical renderer stream viarenderer_prompt_ids/renderer_token_ids(withlogical_idsandNonemeaning “same as expanded”).Train inference bridging is updated to render the full prompt but bridge from
previous_renderer_token_ids()and the incrementalwire_tail, passingprocess_multimodal(andprocess_multimodal=Falseon render/bridge when images are present). Renderers withoutsupports_process_multimodalfail fast on image prompts.TurnTokensfrom generate now includesrenderer_prompt_ids.Turn commit and prefix reuse compare both expanded and logical prefixes; when
renderer_prompt_idsis supplied, a non-extending vLLM prefix raisesValueError. Span attribution andrenderer_path_lenfollow the logical stream when expanded and logical prompts differ (e.g. duplicated image placeholder tokens).mm_token_type_idsis derived from the stored token map on the effective sequence, not merged node tensors.Adds a graph test for canonical expanded tokens vs bridge logical tokens and bumps
aiohttpto>=3.14.1.Reviewed by Cursor Bugbot for commit 9070ddd. Bugbot is set up for automated code reviews on this repo. Configure here.
Latest main sync (2026-08-28)
mainthrough5f24fb843, including the newer typed ACP/RLM changes.Processing flag follow-up
raw_multimodalcaller flag withprocess_multimodal; render, bridge, and generate now share one processing switch.Naming cleanup
has_imagesandprocess_multimodallocals and checkssupports_process_multimodal.Explicit logical token state
MessageNode.renderer_token_idsis nowlist[int] | None:Nonemeans identical to expandedtoken_ids, while[]remains a real empty logical slice.logical_ids;previous_token_ids()is nowprevious_renderer_token_ids().Runtime dependency alignment
>=3.14.1, matching theweb.RequestKeyAPI used by the interception server.