-
Notifications
You must be signed in to change notification settings - Fork 167
Add AI provider icons into model selector #1904
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
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.
Pull request overview
This PR adds AI provider icons to the model selector component, enhancing the visual experience by displaying provider-specific icons alongside model names.
Changes:
- Introduced 11 new provider icon components (OpenAI, Anthropic, Gemini, Mistral, Grok, DeepSeek, Perplexity, Cohere, Cerebras, DeepInfra, Together.ai)
- Updated model selector to display provider icons alongside model names
- Modified data structure from simple string arrays to objects containing both model name and provider information
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/icons/*.icon.tsx | Added icon components for various AI providers |
| packages/ui-components/src/components/ai-chat-container/ai-provider-icon.tsx | Created provider icon mapping component that selects appropriate icon based on provider |
| packages/ui-components/src/components/ai-chat-container/ai-model-selector.tsx | Updated to accept and display model objects with provider information |
| packages/ui-components/src/stories/ai-chat/ai-model-selector.stories.tsx | Updated stories with model objects including provider information |
| packages/ui-components/src/components/assistant-ui/step-settings-assistant-ui-chat-container.tsx | Updated type definition to accept new model structure |
| packages/react-ui/src/app/features/ai/lib/ai-model-selector-hook.ts | Modified to transform model strings into objects with provider information |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div className="flex items-center gap-2 flex-1"> | ||
| <AiProviderIcon | ||
| provider={model.provider} | ||
| className="text-muted-foreground" | ||
| /> | ||
| <span>{model.name}</span> | ||
| </div> | ||
| <Check | ||
| size={16} | ||
| className={cn( | ||
| 'mr-2', | ||
| selectedModel === model | ||
| selectedModel === model.name | ||
| ? 'opacity-100' | ||
| : 'opacity-0', | ||
| )} | ||
| /> |
Copilot
AI
Jan 30, 2026
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.
The Check icon appears after the model name/provider icon, but the layout order suggests it should appear at the end. Consider moving the Check icon inside the flex container or adjusting the flex layout to ensure proper alignment of all elements (icon, name, and check mark).
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.
| <path | ||
| d="M13.744 7.22331C12.6365 6.75184 11.6295 6.07273 10.7773 5.22264C9.59057 4.03353 8.74392 2.54831 8.32532 0.921308C8.30695 0.849046 8.26502 0.784967 8.20617 0.739197C8.14731 0.693428 8.07487 0.668579 8.00032 0.668579C7.92576 0.668579 7.85332 0.693428 7.79447 0.739197C7.73561 0.784967 7.69368 0.849046 7.67532 0.921308C7.25583 2.5481 6.40904 4.03315 5.22265 5.22264C4.3704 6.07263 3.36342 6.75172 2.25598 7.22331C1.82265 7.40998 1.37732 7.55998 0.921316 7.67531C0.848611 7.69317 0.783995 7.7349 0.737802 7.79382C0.691608 7.85274 0.666504 7.92544 0.666504 8.00031C0.666504 8.07518 0.691608 8.14788 0.737802 8.2068C0.783995 8.26572 0.848611 8.30744 0.921316 8.32531C1.37732 8.43998 1.82132 8.58998 2.25598 8.77664C3.36348 9.24811 4.37049 9.92722 5.22265 10.7773C6.40971 11.9666 7.25661 13.452 7.67532 15.0793C7.69318 15.152 7.73491 15.2166 7.79382 15.2628C7.85274 15.309 7.92545 15.3341 8.00032 15.3341C8.07518 15.3341 8.14789 15.309 8.20681 15.2628C8.26573 15.2166 8.30745 15.152 8.32532 15.0793C8.43998 14.6226 8.58998 14.1786 8.77665 13.744C9.24809 12.6365 9.9272 11.6294 10.7773 10.7773C11.9667 9.59052 13.4521 8.74386 15.0793 8.32531C15.1516 8.30694 15.2157 8.26502 15.2614 8.20616C15.3072 8.1473 15.332 8.07487 15.332 8.00031C15.332 7.92575 15.3072 7.85332 15.2614 7.79446C15.2157 7.7356 15.1516 7.69368 15.0793 7.67531C14.6229 7.56047 14.1763 7.40932 13.744 7.22331Z" | ||
| fill={color} | ||
| /> | ||
| <path | ||
| d="M13.744 7.22331C12.6365 6.75184 11.6295 6.07273 10.7773 5.22264C9.59057 4.03353 8.74392 2.54831 8.32532 0.921308C8.30695 0.849046 8.26502 0.784967 8.20617 0.739197C8.14731 0.693428 8.07487 0.668579 8.00032 0.668579C7.92576 0.668579 7.85332 0.693428 7.79447 0.739197C7.73561 0.784967 7.69368 0.849046 7.67532 0.921308C7.25583 2.5481 6.40904 4.03315 5.22265 5.22264C4.3704 6.07263 3.36342 6.75172 2.25598 7.22331C1.82265 7.40998 1.37732 7.55998 0.921316 7.67531C0.848611 7.69317 0.783995 7.7349 0.737802 7.79382C0.691608 7.85274 0.666504 7.92544 0.666504 8.00031C0.666504 8.07518 0.691608 8.14788 0.737802 8.2068C0.783995 8.26572 0.848611 8.30744 0.921316 8.32531C1.37732 8.43998 1.82132 8.58998 2.25598 8.77664C3.36348 9.24811 4.37049 9.92722 5.22265 10.7773C6.40971 11.9666 7.25661 13.452 7.67532 15.0793C7.69318 15.152 7.73491 15.2166 7.79382 15.2628C7.85274 15.309 7.92545 15.3341 8.00032 15.3341C8.07518 15.3341 8.14789 15.309 8.20681 15.2628C8.26573 15.2166 8.30745 15.152 8.32532 15.0793C8.43998 14.6226 8.58998 14.1786 8.77665 13.744C9.24809 12.6365 9.9272 11.6294 10.7773 10.7773C11.9667 9.59052 13.4521 8.74386 15.0793 8.32531C15.1516 8.30694 15.2157 8.26502 15.2614 8.20616C15.3072 8.1473 15.332 8.07487 15.332 8.00031C15.332 7.92575 15.3072 7.85332 15.2614 7.79446C15.2157 7.7356 15.1516 7.69368 15.0793 7.67531C14.6229 7.56047 14.1763 7.40932 13.744 7.22331Z" | ||
| fill={color} | ||
| /> | ||
| <path | ||
| d="M13.744 7.22331C12.6365 6.75184 11.6295 6.07273 10.7773 5.22264C9.59057 4.03353 8.74392 2.54831 8.32532 0.921308C8.30695 0.849046 8.26502 0.784967 8.20617 0.739197C8.14731 0.693428 8.07487 0.668579 8.00032 0.668579C7.92576 0.668579 7.85332 0.693428 7.79447 0.739197C7.73561 0.784967 7.69368 0.849046 7.67532 0.921308C7.25583 2.5481 6.40904 4.03315 5.22265 5.22264C4.3704 6.07263 3.36342 6.75172 2.25598 7.22331C1.82265 7.40998 1.37732 7.55998 0.921316 7.67531C0.848611 7.69317 0.783995 7.7349 0.737802 7.79382C0.691608 7.85274 0.666504 7.92544 0.666504 8.00031C0.666504 8.07518 0.691608 8.14788 0.737802 8.2068C0.783995 8.26572 0.848611 8.30744 0.921316 8.32531C1.37732 8.43998 1.82132 8.58998 2.25598 8.77664C3.36348 9.24811 4.37049 9.92722 5.22265 10.7773C6.40971 11.9666 7.25661 13.452 7.67532 15.0793C7.69318 15.152 7.73491 15.2166 7.79382 15.2628C7.85274 15.309 7.92545 15.3341 8.00032 15.3341C8.07518 15.3341 8.14789 15.309 8.20681 15.2628C8.26573 15.2166 8.30745 15.152 8.32532 15.0793C8.43998 14.6226 8.58998 14.1786 8.77665 13.744C9.24809 12.6365 9.9272 11.6294 10.7773 10.7773C11.9667 9.59052 13.4521 8.74386 15.0793 8.32531C15.1516 8.30694 15.2157 8.26502 15.2614 8.20616C15.3072 8.1473 15.332 8.07487 15.332 8.00031C15.332 7.92575 15.3072 7.85332 15.2614 7.79446C15.2157 7.7356 15.1516 7.69368 15.0793 7.67531C14.6229 7.56047 14.1763 7.40932 13.744 7.22331Z" | ||
| fill={color} | ||
| /> | ||
| <path | ||
| d="M13.744 7.22331C12.6365 6.75184 11.6295 6.07273 10.7773 5.22264C9.59057 4.03353 8.74392 2.54831 8.32532 0.921308C8.30695 0.849046 8.26502 0.784967 8.20617 0.739197C8.14731 0.693428 8.07487 0.668579 8.00032 0.668579C7.92576 0.668579 7.85332 0.693428 7.79447 0.739197C7.73561 0.784967 7.69368 0.849046 7.67532 0.921308C7.25583 2.5481 6.40904 4.03315 5.22265 5.22264C4.3704 6.07263 3.36342 6.75172 2.25598 7.22331C1.82265 7.40998 1.37732 7.55998 0.921316 7.67531C0.848611 7.69317 0.783995 7.7349 0.737802 7.79382C0.691608 7.85274 0.666504 7.92544 0.666504 8.00031C0.666504 8.07518 0.691608 8.14788 0.737802 8.2068C0.783995 8.26572 0.848611 8.30744 0.921316 8.32531C1.37732 8.43998 1.82132 8.58998 2.25598 8.77664C3.36348 9.24811 4.37049 9.92722 5.22265 10.7773C6.40971 11.9666 7.25661 13.452 7.67532 15.0793C7.69318 15.152 7.73491 15.2166 7.79382 15.2628C7.85274 15.309 7.92545 15.3341 8.00032 15.3341C8.07518 15.3341 8.14789 15.309 8.20681 15.2628C8.26573 15.2166 8.30745 15.152 8.32532 15.0793C8.43998 14.6226 8.58998 14.1786 8.77665 13.744C9.24809 12.6365 9.9272 11.6294 10.7773 10.7773C11.9667 9.59052 13.4521 8.74386 15.0793 8.32531C15.1516 8.30694 15.2157 8.26502 15.2614 8.20616C15.3072 8.1473 15.332 8.07487 15.332 8.00031C15.332 7.92575 15.3072 7.85332 15.2614 7.79446C15.2157 7.7356 15.1516 7.69368 15.0793 7.67531C14.6229 7.56047 14.1763 7.40932 13.744 7.22331Z" | ||
| fill={color} | ||
| /> |
Copilot
AI
Jan 30, 2026
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.
The same path element is duplicated four times in the SVG. This creates unnecessary code bloat and makes the icon harder to maintain. Remove the duplicate path elements and keep only one instance.
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.
it's inside svg, I don't what to change it
|
@rSnapkoOpenOps I think it would be nice to also display this icon in the selected model label, not just in the dropdown |
|




Fixes OPS-3509
https://67d165c65ae89f986943666d-iyhembmirv.chromatic.com/?path=/docs/components-aichat-aimodelselector--docs