Repository navigation
refactor(image): Add multimodal model check for image synthesis classes - #283
Open
luk384090-cloud wants to merge 2 commits into
Open
luk384090-cloud wants to merge 2 commits into
luk384090-cloud wants to merge 2 commits into
Conversation
added 2 commits
October 22, 2026 18:20
- Add MULTIMODAL_MODEL_PREFIXES constant array defining model prefixes that run only on multimodal generation endpoints - Implement checkMultimodalModel method to verify whether a model is multimodal and throw corresponding exceptions - Invoke the model check method in asyncCall, syncCall, and call methods - Update method documentation to clarify that multimodal models should be called via the ImageGeneration class - Add unit test cases for rejecting multimodal models in synchronous call methods
…workspace configuration
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
Add multimodal model validation to image synthesis classes to prevent incorrect usage of multimodal models on non-multimodal endpoints.
Changes
MULTIMODAL_MODEL_PREFIXESconstant array defining model prefixes that run only on multimodal generation endpointscheckMultimodalModelmethod to verify whether a model is multimodal and throw corresponding exceptionsasyncCall,syncCall, andcallmethodsImageGenerationclassMotivation
Multimodal models require different generation endpoints and cannot be used with the standard image synthesis API. This change adds early validation to provide clear error messages when users attempt to use multimodal models with incorrect API classes, guiding them to use
ImageGenerationinstead.