Skip to content

Conversation

raunakab
Copy link
Contributor

@raunakab raunakab commented Jul 3, 2025

Description

This PR solves the issue in which the incorrect model icon was being shown.

Addresses: https://linear.app/danswer/issue/DAN-2159/fix-incorrect-model-icon-being-shown.

How Has This Been Tested?

UI changes; no testing needed.

@raunakab raunakab requested a review from a team as a code owner July 3, 2025 19:09
Copy link

vercel bot commented Jul 3, 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 Jul 4, 2025 0:36am

@raunakab raunakab enabled auto-merge July 3, 2025 19:09
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

Refactored LLM model selection UI to fix incorrect model icon display through improved component architecture and type safety.

  • Moved trigger button from web/src/app/chat/input/ChatInputBar.tsx into LLMPopover component for better encapsulation
  • Simplified LLM options from nested provider structure to flat list in web/src/app/chat/input/LLMPopover.tsx
  • Removed problematic hardcoded fallback values (anthropic/claude) that could cause icon mismatches
  • Added provider parameter to modelSupportsImageInput for more accurate capability detection
  • Improved type safety by properly using LlmDescriptor type instead of string parsing

2 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile

raunakab and others added 5 commits July 3, 2025 12:59
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@Weves Weves disabled auto-merge July 4, 2025 00:42
@Weves Weves enabled auto-merge July 4, 2025 00:42
@Weves Weves added this pull request to the merge queue Jul 4, 2025
Merged via the queue into main with commit cbdbfca Jul 4, 2025
14 checks passed
@Weves Weves deleted the fix/model-icons branch July 4, 2025 02:53
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* Fix bug with incorrect model icon being shown

* Update web/src/app/chat/input/LLMPopover.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update web/src/app/chat/input/LLMPopover.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update web/src/app/chat/input/LLMPopover.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update web/src/app/chat/input/LLMPopover.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Add visibility to filtering

* Update the model names which are shown in the popup

* Fix incorrect llm updating bug

* Fix bug in which the provider name would be used instead

---------

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