Repository navigation
[bugfix] canvas: fill the last frame for models that declare it - #98
Merged
Merged
Conversation
Connecting two images to a first-last video node skipped the last-frame slot for every configured service model, so a MiniMax V2 model that declares frameRoles=[first_frame, last_frame] only ever received the first image; the second stayed a context-only reference and was never sent. The command layer now takes optional frame capabilities. The workspace derives them from the configured model's inputRules, so the last slot is filled in edge order only when the model accepts it. Without the capabilities (legacy initialisation, other callers) a configured model is still treated as first-frame only. Fixes #83 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nikiwang-125
added a commit
that referenced
this pull request
Nov 5, 2026
* [test] browser: connect two images to a first-last video node Add an isolated browser check for #83. It uploads two real images, adds a blank video node on a MiniMax model that declares first and last frames, switches to first-last mode without touching the frame pickers, and drags both images onto the node on the canvas. It then checks that the composer shows the first and last frames in edge order, that the project stores first_frame and last_frame references, and that the assignment survives a reload. The check fails on the code before #98 (the last frame stays empty) and passes on main. No remote generation is called. Refs #83 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * [test] browser: pick the MiniMax config by id in the frame check Other browser checks register their own MiniMax-H3 configurations on the shared fixture, so choosing the model by its label matched several options and the picker click failed in strict mode. Select this check's own configuration by its option id instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
首尾帧模式下,依次把两张图片连到视频节点,只要节点选的是已配置的服务模型,第二张图片就不会填入尾帧。连线的命令层对所有服务模型都直接跳过尾帧槽位,没有读取模型实际的帧能力。因此像 MiniMax V2(
frameRoles=[first_frame, last_frame])这样支持首尾帧的模型,第二张图会保持reference角色,提交时被标为context_only而不会发给模型。Fixes #83
Changes
fillConnectedFrames新增可选参数FrameCapabilities,由它决定是否自动填尾帧;新增modelFrameCapabilities(models),从所选模型配置的inputRules.frameRoles读取尾帧能力。applyCommand/executeCommand透传该参数,覆盖单条连线、批量连线和切换到首尾帧模式三种情况。画布工作区根据当前模型目录传入能力。Validation
node --test tests/frameReferences.test.ts:8 passed,新增 3 个用例(声明尾帧的模型按连线顺序填首尾帧;批量连线和切换模式时同样生效;未知模型或仅支持首帧的模型不会填尾帧)。npm test:568 passed,0 failed。tsc --noEmit、vite build:通过。npm run check:i18n:未通过,原因是已有的src/canvas/AssistantTracePage.tsx有 16 行中文超出基线,main 上同样失败,与本次改动无关;本次没有新增文案。Remaining validation
reference_policy在尾帧槽位已选定时的行为与 issue 中的验证一致,本次未改动后端。🤖 Generated with Claude Code