-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Single source of truth for image capability #4612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR centralizes image input capability detection by adding a supports_image_input
field to model configurations, replacing hardcoded model checks with a dynamic configuration-based approach.
- Added
supports_image_input
boolean field toModelConfigurationView
in/backend/onyx/server/manage/llm/models.py
as the single source of truth - Removed hardcoded
MODEL_NAMES_SUPPORTING_IMAGE_INPUT
array from/web/src/lib/llm/utils.ts
in favor of configuration-based checks - Updated image capability checks across components to use
modelSupportsImageInput()
withllmProviders
parameter - Added migration script
47a07e1a38f1_fix_invalid_model_configurations_state.py
to handle model configuration state updates - Modified
fetchAssistantData
andfetchSomeChatData
to filter assistants based on model configuration image support
10 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Single source of truth for image capability * Update web/src/app/admin/assistants/AssistantEditor.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Fix tests --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Single source of truth for image capability * Update web/src/app/admin/assistants/AssistantEditor.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Fix tests --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Description
Fixes https://linear.app/danswer/issue/DAN-1909/make-gemini-image-capable
How Has This Been Tested?
Tested various image capable models locally. Ideally, would add a test for this, but need seeding capability for playwright tests.
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.