Skip to content

refactor(image): Add multimodal model check for image synthesis classes - #283

Open
luk384090-cloud wants to merge 2 commits into
mainfrom
dev/issues-11
Open

luk384090-cloud wants to merge 2 commits into
mainfrom
dev/issues-11

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator

Summary

Add multimodal model validation to image synthesis classes to prevent incorrect usage of multimodal models on non-multimodal endpoints.

Changes

  • 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

Motivation

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 ImageGeneration instead.

luk384090-cloud 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant