Fix: Add UI validation for models requiring inputAsset - #75
Merged
Conversation
- Disable Generate button when model requires image/video/audio but none selected - Add helper text showing 'This model requires an asset' - Add improved error logging for FAL API errors - Add translations for asset requirement message (EN/RU) - Fixes FLUX.1 Kontext [pro] generation failure Resolves issue where FLUX.1 Kontext [pro] and other image-to-image models could be triggered without required image assets, causing API errors. Co-Authored-By: Ilya Timonin <timoncool@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
devin-ai-integration
Bot
deleted the
devin/1730055000-fix-flux-kontext-validation
branch
October 31, 2025 07:58
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.
Fix: Add UI validation for models requiring inputAsset
Summary
Fixes a critical issue where FLUX.1 Kontext [pro] and other image-to-image models could be triggered without required image assets, causing API errors. The fix adds UI-level validation that:
The validation applies to all ~20+ models with
inputAssetrequirements, including:Changes by file:
src/components/right-panel.tsx - Added validation logic that checks if
endpoint.inputAssetis defined and if the corresponding asset field ingenerateDatais populated. If not, disables button and shows message.src/data/mutations.ts - Wrapped FAL API submission in try-catch with detailed error logging (message, status, body, response) to surface actual API errors.
messages/en.json, messages/ru.json - Added
thisModelRequiresAssettranslation key.Review & Testing Checklist for Human
src/components/media-panel.tsx(Runware polling logic from PR Handle Runware polling for in-progress media items #74). If it does, the base branch may be incorrect and PR should be recreated frommain.Then test the actual fix:
Test Plan
Notes
codex/add-response-handling-for-runware(may need to verify this is correct)/home/ubuntu/HANDOFF_REPORT.mdand/home/ubuntu/videosos_model_analysis.mdfor comprehensive model coverage analysis