Repository navigation
Generate new images from visual references for non-VIP users - #276
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Danger prompt-contract warning checked: the change only extends the text inside the existing image_references block. Handlebars conditions, partial names, role markers and template data shape are unchanged. The prompt-rendering tests passed in the local workspace suite. The dependency gate also found today's RUSTSEC-2026-0385 in the existing ctutils 0.4.2 lockfile entry. I am updating only that transitive dependency to the fixed 0.4.4 release and rerunning validation. |
|
Reviewed the guide at 7db1308. The notice-before-limits concern is valid for the unconditional wording. I changed the notice to say “попробую нарисовать” (will try to draw), so it does not promise a queued or delivered image before admission. The regular scheduling path still returns generation_rate_limited or another concrete failure to the dialog for explanation. Keeping the notice before scheduling preserves the requested explanation-before-generation behavior and also covers provider failures that admission checks cannot predict. The Vision text is intentionally reference data, needed for this feature. It only reaches image prompt refinement/generation, with an explicit data-only instruction. Existing content classification and generation safety handling remain in that path. It does not become a tool instruction or executable code. |
|
Final review verification at a961b17: CI, dependency and SAST checks passed. PR-Agent run 39954980068 explicitly logged no actionable review findings and no actionable code suggestions for this head. The earlier guide's notice wording and prompt-data concerns are addressed above. Current inline comments, review threads and submitted reviews are empty. Local workspace validation passed 2665 tests with 10 ignored. |
When a non-VIP user requests an image while replying to or attaching a picture, draw_image currently selects VIP editing and refuses the request. The executor now describes the selected sources through Vision, queues an explanation of the editing restriction, and schedules a new text-to-image job in the regular queue using the user request and reference descriptions.
VIP editing stays unchanged. The fallback preserves captions and generation options, respects chat permissions and generation limits, and reports Vision or notice failures without scheduling an unreferenced image. The notice describes an attempt rather than promising a result before admission or provider success. Tool instructions explain the new behavior.
The existing transitive ctutils lockfile entry is updated from 0.4.2 to 0.4.4 to fix RUSTSEC-2026-0385, which blocked CI. No advisory exception was added.
Validation: cargo fmt --all -- --check; cargo clippy --locked --workspace --all-targets --all-features -- -D warnings; cargo test --locked --workspace (2665 passed, 0 failed, 10 ignored); cargo audit --ignore RUSTSEC-2023-0071 (existing optional-MySQL exception, three existing allowed warnings); cargo machete. Regression coverage includes attached, quoted and history references, multiple sources, permissions, limits, Vision errors and notice ordering.