Skip to content

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Apr 25, 2025

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.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@Weves Weves requested a review from a team as a code owner April 25, 2025 18:34
Copy link

vercel bot commented Apr 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2025 7:46pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 to ModelConfigurationView 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() with llmProviders parameter
  • Added migration script 47a07e1a38f1_fix_invalid_model_configurations_state.py to handle model configuration state updates
  • Modified fetchAssistantData and fetchSomeChatData 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>
@Weves Weves added this pull request to the merge queue Apr 25, 2025
Merged via the queue into main with commit 23c6e0f Apr 25, 2025
10 of 11 checks passed
@Weves Weves deleted the make-gemini-vision-compatible branch April 25, 2025 21:30
aronszanto pushed a commit to aronszanto/onyx that referenced this pull request Apr 26, 2025
* 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>
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* 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>
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.

2 participants