Repository navigation
Rshahbazyan/opencode image attachments - #5175
Conversation
…ode run The adapter forwarded only a single text user turn, so image questions could not be sent through the sandboxed harness. It now decodes each input_image data URI of the user turn on the host, uploads the bytes to /tmp/nemo-gym-attachments/image-<n>.<ext> in the sandbox and passes each path with -f to `opencode run`; the input_text part stays the query, and a text-only turn produces exactly the launch command and OpenCode config it always did. OpenCode 1.17.11 labels a local `-f` file text/plain and routes it through its Read tool, which sniffs PNG, JPEG, GIF and WebP by magic bytes and attaches a data: file part that the openai-compatible provider sends as an image_url part (no `detail`). It forwards that part only to a model whose config declares image input (unsupportedParts in provider/transform.ts substitutes an ERROR text otherwise), so for a turn with images the generated config declares modalities.input as text and image. Anything else, a remote URL (the sandbox has no internet) or a file_id input fails the row before an upload or a run, with the reason in the error. Each row records the number of attached images in opencode_attachment_count. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Rima Shahbazyan <[email protected]>
…th images opencode_full.yaml and opencode_search_full.yaml run the OpenCode sandboxed agent of opencode.yaml and opencode_search.yaml on all 1000 HLE-Diamond questions, the 272 image questions included, now that the adapter attaches input_image parts with `opencode run -f`. The default set's file cannot serve them because it bakes the HLE instruction as a system message, which the adapter does not forward, so prepare.py gains `prompt="opencode"` (CLI `--prompt opencode`) and the thin prepare_opencode.py wrapper writes hle_diamond_benchmark_opencode_full.jsonl with prompts/opencode.yaml: one user message per row, the instruction folded after the question, image rows carrying the same input_image block. The README states the image path and its limits (formats, the synthetic Read-tool parts ahead of the question, no `detail` transmitted, which matches upstream, OpenCode's size normalisation, the model-modality declaration) and records the 5-row image smoke on local Docker: 5/5 rows scored, an image_url part on the first model call of every row, no adapter or model error. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Rima Shahbazyan <[email protected]>
… dataset holds them OpenCode v1.17.11 (image/image.ts) downscales any image over 2000 px on a side or 5 MiB of base64 with its bundled photon resizer and re-encodes it (PNG, else JPEG q80..40); a one-row control smoke on the 14950x2780 PNG of HLE-Diamond row 66f1b940f8bb4425f74e4299 confirmed the resizer runs inside gym-opencode-science:local (the model received a 2000x372 PNG). 26 of the 272 Diamond image rows (12 PNG, 14 JPEG) exceed that threshold; upstream sends the original bytes. `auto_resize: false` is not the fix: it raises SizeError and fails the turn. Lift `attachment.image.max_width`, `max_height` and `max_base64_bytes` in the generated config whenever the turn carries images (schema: packages/core/src/v1/config/attachment.ts), so `normalize` returns the part untouched; `opencode_config` overrides still win. Extend the modality test to assert the keys, and state the affected row count, the control-smoke evidence and the open capture step in the HLE-Diamond README's departures and image sections. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Rima Shahbazyan <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM — no concerns found.
Reviewed all 10 changed files and traced the affected input, sandbox-transfer, configuration, preparation, and verification paths. The text-only launch/configuration behavior is preserved, and the full HLE-Diamond presets retain the existing tool and network settings.
Validation was static: tests and reported model rollouts were not rerun. Two delegated reports were unavailable, so their adapter scopes were independently inspected.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
yaoyu-33
left a comment
There was a problem hiding this comment.
SHIP WITH CARE. Thanks for this. Running the image rows through OpenCode closes the 272-row gap in the with-tools presets, and the adapter's claims hold up against OpenCode v1.17.11 source: -f goes through the Read tool, modalities.input drives the image capability, and attachment.image sets the normalize limits.
What we checked and found fine:
- Text-only turns produce a byte-identical OpenCode config and
opencode runcommand compared with the merge base. We checked this independently for string and single-input_textturns, withdebug,remaining_context, and useropencode_configsettings. - The 728-row
opencode,opencode_search,pi, andpi_searchpresets resolve identically tomain.opencode_fullandopencode_search_fulldiffer from them only in the agent's dataset; tools, network policy, and effort carry over. - The judge sees the question with the folded instruction and no image, the same as the existing OpenCode presets, and
opencode_attachment_countis additive.
No blockers or risks; 7 inline notes. The two we'd most like settled before merge are the README/evidence mismatch (benchmarks/hle_diamond/README.md:528) and the rejected-image path (app.py:895).
PR hygiene
- The title isn't Conventional Commit style. Suggested:
feat(opencode_sandboxed_agent): attach input_image parts and add HLE-Diamond full-set presets. - No linked issue, and the body doesn't say why none is needed. It cites cmunley1's request and #4727.
- The 73.2% / 58.1% / 81.9% figures are author-reported only, with no rollout artifacts. The README comment lists what would back them.
- Merge order: #5176 and #5177 also edit
benchmarks/hle_diamond/README.mdandresources_servers/equivalence_llm_judge/tests/test_hle_diamond.py, so whichever lands later will need a rebase.
Validation on the review side
responses_api_agents/opencode_sandboxed_agent/tests/test_app.py: 72 passed.test_hle_diamond.py: 65 passed. 25 config tests need hostname resolution the review host lacks; they pass with a test-only host shim and fail the same way onmain.- We also ran mutation testing and the suggested tests locally.
- Not rerun: model rollouts, GPU, or a real sandbox.
| query = input_item.content[0]["text"] | ||
|
|
||
| assert query, body.input | ||
| # Fails before anything is uploaded or run, so an unsupported image fails the row explicitly. |
There was a problem hiding this comment.
A rejected image doesn't fail just the row. _parse_user_turn runs here, after _run has already seeded the session and started the sandbox (L1244). The error comes back as a 500 from /run, and with the default route_failures_to_sidecar=False that ends the whole collection.
Could you:
- parse the turn at the top of
_run, beforeseed_session; - replace the
assert ..., input_itemschecks (L153, L159, L163) with aValueErrorthat reports part-type counts (today those messages put the full base64 data URIs into the server log and the 500 body); - reword this comment and the agent README's "fail the row before anything runs" to match?
| try: | ||
| content = base64.b64decode(payload, validate=True) | ||
| except (binascii.Error, ValueError) as exc: | ||
| raise ValueError(f"input_image part {index} carries invalid base64") from exc | ||
| return _ImageAttachment(remote_path=f"{_REMOTE_ATTACHMENTS_DIR}/image-{index}.{extension}", content=content) |
There was a problem hiding this comment.
Only the declared media type is checked, never the decoded bytes:
data:image/png;base64,uploads a 0-byte file, which OpenCode then fails on after launch.- BMP bytes labelled
image/pngsniff asimage/bmpin OpenCode's Read tool (media.ts, read.ts). The run continues without the image, and the row is scored withopencode_failed=False.
Rejecting empty content (below) would fix the first case. Optionally, checking the four magic signatures OpenCode sniffs would make "fail before upload" hold for the bytes too.
| try: | |
| content = base64.b64decode(payload, validate=True) | |
| except (binascii.Error, ValueError) as exc: | |
| raise ValueError(f"input_image part {index} carries invalid base64") from exc | |
| return _ImageAttachment(remote_path=f"{_REMOTE_ATTACHMENTS_DIR}/image-{index}.{extension}", content=content) | |
| try: | |
| content = base64.b64decode(payload, validate=True) | |
| except (binascii.Error, ValueError) as exc: | |
| raise ValueError(f"input_image part {index} carries invalid base64") from exc | |
| if not content: | |
| raise ValueError(f"input_image part {index} is empty") | |
| return _ImageAttachment(remote_path=f"{_REMOTE_ATTACHMENTS_DIR}/image-{index}.{extension}", content=content) |
| # OpenCode's `attachment.image` limits (config schema packages/core/src/v1/config/attachment.ts at v1.17.11): | ||
| # an image within all three is forwarded unchanged. 2**31 - 1 is the largest value its PositiveInt accepts | ||
| # without a JSON precision caveat and is far above any image a chat-completions request can carry. | ||
| OPENCODE_IMAGE_LIMITS_UNRESTRICTED = { |
There was a problem hiding this comment.
Lifting the limits here (applied at L780) has three effects:
- It becomes a default of the shared adapter, for every benchmark that sends images.
- It covers every image in an image session, including images the agent's own Read tool opens mid-run; OpenCode normalizes those with the same limits (processor.ts:575).
- It is also what produced the one provider rejection in the 272-row run (14950x2780), and that row then scores as a wrong answer.
Would you consider keeping OpenCode's defaults in the adapter and setting opencode_config.attachment.image.* in benchmarks/hle_diamond/opencode_full.yaml instead?
Separately, the comment's rationale is off: OpenCode's PositiveInt is Schema.Int.check(Schema.isGreaterThan(0)), with no 2^31 bound (schema.ts:3).
|
|
||
| command = sandbox_mock.exec.await_args_list[0].kwargs["command"] | ||
| # The f-string's line continuations fold the launch line into one; the query follows `--` directly. | ||
| assert "--thinking -- hello " in command and "nemo-gym-attachments" not in command |
There was a problem hiding this comment.
These tests don't pin what the PR body says they do:
_mock_sandboxreplaces_create_opencode_configwith{}(L568).- This check is a substring match.
- The config test compares
vision["attachment"]to the module constant itself (L662).
These mutants pass all 72 tests:
max_widthset to 2000;- the lift applied after the user
opencode_configmerge, so the override both READMEs document stops working; image/webpdropped;- GIF written as
.png; chmod(0o644)removed;- a staging dir that is never cleaned up.
Could you add:
- a golden test of the real text-only config and run tokens;
- an image-turn test with literal limits, plus an
opencode_config.attachment.image.max_width=2000override case; - GIF and WebP extension cases;
- in
test_hle_diamond.py, a test that feeds a preparedopencode_fullrow through_parse_user_turn?
The behaviour is right today: text-only output is byte-identical to the merge base.
| `++...opencode_config.attachment.image.max_width=2000 ...max_height=2000 ...max_base64_bytes=5242880`: | ||
| every captured `image_url` carried a 2000x372 PNG of 105,698 bytes, not the dataset's bytes, which | ||
| shows the resizer loads and runs in the science image. | ||
| - As committed (limits lifted by the adapter): NOT YET CAPTURED. The adapter's unit test asserts the |
There was a problem hiding this comment.
The README and the PR body disagree:
- This line still says the lifted-limits capture is NOT YET CAPTURED.
- L712-716 and L793-797 say all 272 images reach the model as the dataset's bytes.
- The PR body says the 272-row run lost this very row (14950x2780 = 41.6 Mpx) to a provider rejection. Neither README mentions that.
- The 73.2% / 58.1% / 81.9% figures aren't recorded anywhere in the README.
Could you add a run record like the existing ones, with:
- date and Gym commit;
- scored rows out of 272, sidecar count, and
mean/opencode_failed; - the rejected row's uuid and error;
- links to the rollouts and the resolved config;
- where 58.1% comes from (158/272 of the 946/1000 no-tools run, which predates
judge_labels_case_insensitive?); - the 728-row
opencoderesult (620/728) behind the 81.9%?
| [ | ||
| ("opencode.yaml", "hle_diamond_opencode_agent", "hle_diamond_pi_agent"), | ||
| ("opencode_search.yaml", "hle_diamond_opencode_agent", "hle_diamond_pi_agent"), | ||
| ("opencode_full.yaml", "hle_diamond_opencode_agent", "hle_diamond_pi_agent"), |
There was a problem hiding this comment.
These new cases compose sandbox_docker_local.yaml with the two _full presets, but its header (sandbox_docker_local.yaml:4-5) still lists only opencode, opencode_search, pi, pi_search. Its warning about search presets keeping network_access applies to opencode_search_full too. Could you add the two full presets there?
| @@ -810,7 +907,8 @@ new `serp_url_patterns` regex is reported as dropped until `SERP_PATTERN_SUBSTRI | |||
| ```bash | |||
| pytest tests/unit_tests/test_hle_diamond.py tests/unit_tests/test_hle_diamond_search_exclusions.py \ | |||
There was a problem hiding this comment.
tests/unit_tests/test_hle_diamond.py and tests/unit_tests/test_hle_diamond_search_exclusions.py don't exist, so this block fails with "module or package not found" before it reaches the line this PR adds. This predates the PR, but since the block is edited here:
| pytest tests/unit_tests/test_hle_diamond.py tests/unit_tests/test_hle_diamond_search_exclusions.py \ | |
| pytest resources_servers/equivalence_llm_judge/tests/test_hle_diamond.py resources_servers/tavily_search/tests/test_hle_diamond_search_exclusions.py \ |
yaoyu-33
left a comment
There was a problem hiding this comment.
Approving. The notes from my earlier review are non-blocking: the 500 on a rejected image after the sandbox starts, the image-limit lift living in the shared adapter, tests that pin the new behavior more tightly, and the README benchmark numbers / test paths. Fine to address them here or in a follow-up.
|
/ok to test 39993e3 |
|
Hi @rimashahbazyan , could you take a look at the failing |
Resolve the conflicts with #5177 (HLE-Diamond reference sandbox image) in benchmarks/hle_diamond/README.md and resources_servers/equivalence_llm_judge/tests/test_hle_diamond.py by keeping both sides: this branch's opencode_full / opencode_search_full presets and main's opencode_reference preset are additive. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Rima Shahbazyan <[email protected]>
…config override The OpenCode sandboxed agent now calls _create_opencode_config(request, image_input=...) on every run. VibenchAgent overrides that method with the old one-argument signature, so every ViBench rollout, text-only ones included, raised TypeError, and the existing signature-parity test failed in the server suite. Accept the keyword and pass it to the parent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Rima Shahbazyan <[email protected]>
Replace the README's "NOT YET CAPTURED" acceptance step with the 272-image-row run of 2026-10-26, and stop claiming that every image reaches the model: the images are sent as the dataset's bytes, and an endpoint with its own size limit can reject one (GPT-6 Astra rejects the 14950x2780 PNG, which then scores 0 after OpenCode retries until sandbox_timeout). List the full and reference presets in the sandbox_docker_local.yaml header. Addresses yaoyu-33's review notes on the README and the Docker override header. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Rima Shahbazyan <[email protected]>
Thanks @weijiac0619 . The failing server was Also pushed:
The remaining non-blocking notes (parse the turn before the sandbox starts, stricter byte checks, tighter tests) I'll take in a follow-up so this stays reviewable. |
|
/ok to test d87dd8d |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41499277104 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41503464905 |
…-opensandbox main's opencode image-attachments work (#5175) touched the same file as this branch. Four conflicts in responses_api_agents/opencode_sandboxed_agent/app.py, all kept-both: * imports: `hashlib` (ours) alongside `base64`/`binascii` (main). * the launch: main added `image_input=bool(attachments)` to _create_opencode_config; this branch replaced _runtime_plugins() with the unified _plugin_uploads() and the verified upload. Both retained. * the run command: main delivers the query as argv and appends `-f` attachment flags; this branch pipes the query on stdin when opencode_query_via_stdin is set. The `-f` flags are independent of how the message text is delivered, and query_arg_str is empty only on that opt-in path (default False), so main's argv behaviour remains the default. Kept the pipe, extra_env_str, and the attachment flags together. * the result row: opencode_plugins_loaded and opencode_terminal_reason alongside main's opencode_attachment_count. Also fixes a latent bug those new tests exposed. _resolve_opencode_env looks up the search server's Exa cache proxy through get_global_config_dict(), guarded by `except Exception` so a missing cache can never break a rollout. That guard did not hold: Hydra reports a config resolution failure by catching its own MissingConfigException and calling sys.exit(1), and SystemExit is a BaseException that `except Exception` does not stop. A best-effort cache lookup could therefore terminate the rollout it was only meant to optimise. The guard now catches SystemExit as well. Validation: confirmed the three new attachment tests pass on main's pristine files and failed only against this merge, which is how the SystemExit path was found. After the fix: agent suite plus opencode_search suite 97 passed, with the same single pre-existing failure (test_import_only_loads_shared_opencode_modules, a subprocess timeout that also fails on unmodified main here). ruff check and ruff format clean. Signed-off-by: abhibhag <[email protected]>
Brings in main up to 94545e7 (#5141, #5384, #5144, #4615, #4954, #5001, #5175). Textual conflict: nemo_gym/cli/env.py, imports only. This branch imports PIPE from subprocess (the server start error capture); main imports SIGKILL from signal (#5141, the shutdown drain). Both are kept: "from signal import SIGINT, SIGKILL" and "from subprocess import PIPE, Popen, TimeoutExpired". Semantic conflict: #5141 starts each server in its own session (run_command(..., start_new_session=True)) so shutdown can signal its process group, while this branch starts servers through RunHelper._spawn_server, which keeps the tail of the error stream. The merged call passed start_new_session to _spawn_server, which did not accept it (11 test_cli failures). _spawn_server now takes start_new_session and forwards it to run_command, so both behaviours hold. The dry-run path keeps this branch's process.wait(): the tail thread of _spawn_server owns the piped stream, so main's communicate() would compete with it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
Resolved conflicts: - ATTRIBUTIONS.md: main moved the Harbor row to nemo_gym/data/tasks/ and added the NeMo Skills generic/math prompt row and note; this branch added the HLE with-tools blocklist row and note. Kept main's rows and notes and appended the blocklist row and note after them, in the table's insertion order. - benchmarks/hle_diamond/README.md: main (#5175) added the opencode_full/opencode_search_full material and the Image questions through OpenCode section; this branch added the Upstream web tools section with its three residuals. Kept both sections (Image questions first, then Upstream web tools next to Search exclusions, which it refers to) and both test files in the Tests command. So that the lists of presets name everything that now exists: added opencode_hle_tools to the Scope table, the text-preset and unlisted-preset sentences, the reasoning-effort inheritance note, the harness-validation preset list and the Rows departure; named the full-set presets in the Sandboxed agents intro; scoped the Web tools and Leakage policy departures to the Tavily search presets with a pointer to Upstream web tools; and made the aggregate limitation cover every OpenCode and Pi preset. - resources_servers/equivalence_llm_judge/tests/test_hle_diamond.py: both sides added presets to the judge-prompt and local-Docker parametrizations. Kept both: main's opencode_full and opencode_search_full, then opencode_hle_tools. LISTED_BENCHMARKS merged cleanly (opencode_hle_tools declares no dataset, so it is not listed). Signed-off-by: Rima Shahbazyan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
What does this PR do?
Lets the OpenCode sandboxed agent carry image questions, and adds HLE-Diamond presets that use it over the full 1000-row set.
Shared component changed:
responses_api_agents/opencode_sandboxed_agent(the OpenCode sandboxed agent). Per the maintainer's note on #4727, please give the adapter diff a closer look than the benchmark files; it is used by every benchmark that composes the OpenCode presets. The text-only path is meant to be byte-for-byte unchanged (same generated config, sameopencode runcommand), and the tests assert that.Origin: cmunley1 asked for image support inside the harness, so the HLE-Diamond image rows (272/1000) stop being excluded from the with-tools presets.
Adapter (
app.py, 3 commits):input_textpart plus any number ofinput_imageparts. Eachinput_imagedata URI is decoded on the host, written to/tmp/nemo-gym-attachments/image-<n>.<ext>in the sandbox (outside the task workdir, so it cannot enter a patch), and passed toopencode run -f. OpenCode's Read tool sniffs the bytes and attaches them as an image part of the first model call. Rows reportopencode_attachment_count.modalities.inputis declared as["text", "image"]in the generated OpenCode config only on turns that carry images. Without it OpenCode substitutesERROR: Cannot read ... (this model does not support image input)text for the image (the first smoke hit this: 0/5). Text-only turns do not get the declaration, so a text-only model is never sent images the agent's Read tool opens mid-run.attachment.image.max_width/max_height/max_base64_bytesto 2^31 - 1 so the model receives the dataset's bytes, as upstream HLE'srun_model_predictions.pysends them. Any limit can be restored throughopencode_config.attachment.image.*. (auto_resize: falseis not that knob; it fails the turn instead.)detailfield is transmitted: OpenCode builds its own chat-completions request with URL-onlyimage_url, which matches upstream (the default HLE-Diamond set sendsdetail: highthrough the gateway).image_urls (the sandbox has no internet),file_idinputs, non-base64 data URIs, invalid base64, and media types other than PNG/JPEG/GIF/WebP (the set OpenCode's Read tool recognises).Benchmark (
benchmarks/hle_diamond):prepare.py --prompt opencode/prepare_opencode.pymaterialize all 1000 rows withprompts/opencode.yaml(HLE instruction folded into the single user turn; image rows keep theirinput_imageblock) intohle_diamond_benchmark_opencode_full.jsonl. The default set's file cannot serve the adapter because it carries the instruction as a system message, which the adapter does not forward.hle_diamond/opencode_fullandhle_diamond/opencode_search_full(same agent, tools and network policy asopencode/opencode_search, dataset swapped). Need a vision-capable policy model. The existing 728-row text presets are untouched; Pi still accepts text parts only.-ffiles, the modality declaration, the resizer and its limits, format coverage: 186 PNG / 81 JPEG / 4 WebP / 1 GIF; 26 rows exceed 2000 px), smoke records, and the test command.Update after review and CI (new head):
responses_api_agents/vibench_agent/app.py:VibenchAgent._create_opencode_confignow accepts and forwardsimage_input. Without it every ViBench rollout raisedTypeError(caught by its signature-parity test in the server suite). This is the only subclass that overrides the method.main(signed merge commit); conflicts with Rshahbazyan/hle reference sandbox image #5177 resolved by keeping both sides.sandbox_docker_local.yamlheader lists the full and reference presets.Validation
Against the final diff (39993e3):
Adapter tests added cover: string / single-text / text+images turn parsing; each rejection path (remote URL,
file_id, non-base64 URI, invalid base64, unsupported media type) raises before any upload; the generated config declares the image modality and the liftedattachment.imagelimits only when the turn has images; the-farguments and upload paths on the launch command; and that a text-only turn yields exactly the pre-change config and command. Benchmark tests cover the--prompt opencodeoutput (one user turn per row, image block kept, written to the_opencode_fullfile), the CLI surface, and that the_fullpresets change only the agent's dataset.Dataset preparation:
Rollouts
All runs below used the local-Docker recipe from the README (
gym-opencode-science:local, host networking), GPT-6 Astra as policy withreasoning.effort: high, o3-mini as judge. Label for every number: local Docker; egress not restricted; comparison infrastructure only. These support a comparison with the HLE-Diamond blog column, not a reproduction (the README's "Sandboxed agents (with tools)" section lists the remaining departures: harness system prompt, instruction as user text, synthetic Read-tool parts ahead of the image, leakage blocklist coverage).5-row image smoke (3 PNG, 1 JPEG, 1 WebP; row ids in the README): 5/5 scored reward 1.0,
opencode_attachment_count = 1andopencode_failed = 0on every row, no adapter or model error. Model-call capture confirmed oneimage_urlpart per row whose data URI equals the dataset's byte for byte, with nodetailkey. The same smoke before the modality declaration scored 0/5 with every image replaced by OpenCode's "does not support image input" text.Resizer control (one 14950x2780 PNG row, OpenCode's default limits restored via
opencode_config): the capturedimage_urlwas a 2000x372 PNG of 105,698 bytes, not the dataset's 743,849 bytes, i.e. the resizer is active in the science image and the lift is needed for unresized delivery.272-row image-only run,
hle_diamond/opencode_full:image_urlwithdetail: high)opencode+ 272 image viaopencode_full)One row failed with a provider-side rejection of a 41.6 Mpx image. That is the cost of sending the dataset's bytes unresized rather than letting OpenCode downscale; it is documented, and an opt-in downscale (or restoring
attachment.image.*limits for a run) is the follow-up rather than a silent default resize.Compatibility and benchmark impact
attachmentblock, identicalopencode runcommand. Existinghle/opencode*andhle_diamond/opencode*(728-row) results are unaffected.opencode_attachment_count(default 0) on every row; additive.input_textpart, or with parts other thaninput_text/input_image, still fail the assertion they always did. Image inputs that OpenCode cannot show now fail explicitly before the run instead of being accepted and mangled.benchmarks/hle_diamond/opencode_full.yaml,opencode_search_full.yaml,prepare_opencode.py, and the_opencode_fulldata file (prepared, not committed;cais/hle-diamondis gated).opencode_config.attachment.image.*, opt-in downscale tracked as follow-up.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).