Repository navigation
feat: add native compression models with image-aware summaries - #656
Open
Neko-Yukari wants to merge 2 commits into
Open
Neko-Yukari wants to merge 2 commits into
Neko-Yukari wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Image-bearing tool results can contain megabytes of Base64. Treating that payload as summary text inflates token estimates and can reject compression before inference. This adds an optional native compression model that receives selected images when its metadata declares image input; text-only models receive retrievable references. Summaries retain those references in either case.
With
compress.modelset, the main model selects the topic and closed range boundaries. DCP sends only the selected observable source and existing compressed blocks to the configured model. Without this setting, existing main-authored summaries remain unchanged.generate.textfor text-only requests. Check model capabilities, context/output budgets and image dimensions; forward cancellation and clean up the temporary session.Validation:
npm run typecheckandnpm run format:checkpass in a clean LF checkout (the working Windows checkout uses CRLF for untouched files).rm -rfbuild script was replaced by the equivalent direct TypeScript build for the check. One initial file-lock-related logger failure passed on isolated and full rerun.execFileSync("npm", ...)was adapted at invocation time tonode npm-cli.json Windows, without changing the repository script.Native end-to-end validation used the built plugin with OpenCode 2.0.30 and a controlled local provider: the vision branch made one summary request with one native image and zero tools, while the text-only branch made one request with zero images. Both committed a summary and retained an image file whose bytes matched the source. A third run with non-image bytes labelled as PNG completed with a reference and no image attachment. A separate real-provider run also generated a valid image summary and retained the original reference. All native checks used fresh V2 sessions; V1 native host integration and historical session migration were not exercised.
Known existing check limitation:
npm auditreports 6 vulnerabilities (5 critical, 1 high), rooted in the sameseroval,solid-jsandbrace-expansionversions as the upstream baseline. Auditing the baseline lockfile separately reports 17 vulnerabilities. This change does not apply unrelated forced dependency upgrades.