Skip to content

chore: Standardized the OpenAI icon#30471

Merged
asukaminato0721 merged 1 commit intolanggenius:mainfrom
hjlarry:p347
Jan 2, 2026
Merged

chore: Standardized the OpenAI icon#30471
asukaminato0721 merged 1 commit intolanggenius:mainfrom
hjlarry:p347

Conversation

@hjlarry
Copy link
Contributor

@hjlarry hjlarry commented Jan 2, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

fix #30470

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
Copilot AI review requested due to automatic review settings January 2, 2026 11:02
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 2, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @hjlarry, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the visual representation of OpenAI models within the application by removing multiple color-specific OpenAI icons and their corresponding rendering logic. The change consolidates the display to a single, consistent OpenAI icon, simplifying icon management and ensuring a uniform user experience across different OpenAI model versions. This addresses issue #30470.

Highlights

  • Icon Removal: Removed specific colored OpenAI icons (OpenaiBlue, OpenaiTeal, OpenaiViolet) and their associated JSON and TypeScript files from the icon library.
  • Icon Import Cleanup: Updated the llm/index.ts file to remove imports for the deprecated OpenAI icons, ensuring a cleaner and more focused icon module.
  • Standardized Icon Usage: Modified the model-icon/index.tsx component to remove conditional rendering logic that previously displayed different colored OpenAI icons based on specific model names (e.g., gpt-4.1, gpt-4o, gpt-4), now using a single, standardized OpenAI icon for all.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to standardize the OpenAI icon by removing several color variations (Blue, Teal, Violet) and using a single OpenaiYellow icon. The changes involve deleting the corresponding icon JSON and TSX files, and updating the icon index and usage sites. While the cleanup is good, the logic for displaying the standardized icon seems incomplete. The current condition only applies the yellow icon to OpenAI models with names starting with 'o', leaving other models like gpt-4 to use a generic icon. I've suggested a fix to apply the standardized icon to all OpenAI models to fully achieve the goal of this PR.

Copy link
Contributor

Copilot AI left a 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 standardizes OpenAI model icons by removing colored variants and simplifying the icon selection logic. Previously, different GPT model families (gpt-4, gpt-4o, gpt-4.1) used different colored OpenAI icons. Now, only models starting with 'o' (like o1, o3-mini) use the OpenaiYellow icon, while other OpenAI models fall back to the standard provider icon.

Key changes:

  • Removed model-specific icon logic for GPT-4 variants in favor of a single condition for "o" series models
  • Deleted three unused icon components (OpenaiBlue, OpenaiTeal, OpenaiViolet) and their associated files
  • Updated icon exports to remove references to deleted components

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
web/app/components/header/account-setting/model-provider-page/model-icon/index.tsx Simplified icon selection logic by removing conditional checks for gpt-4.1, gpt-4o, and gpt-4 models; retained only the condition for models starting with 'o'
web/app/components/base/icons/src/public/llm/index.ts Removed exports for OpenaiBlue, OpenaiTeal, and OpenaiViolet icon components
web/app/components/base/icons/src/public/llm/OpenaiViolet.tsx Deleted violet variant of OpenAI icon component
web/app/components/base/icons/src/public/llm/OpenaiViolet.json Deleted violet variant icon data file
web/app/components/base/icons/src/public/llm/OpenaiTeal.tsx Deleted teal variant of OpenAI icon component
web/app/components/base/icons/src/public/llm/OpenaiTeal.json Deleted teal variant icon data file
web/app/components/base/icons/src/public/llm/OpenaiBlue.tsx Deleted blue variant of OpenAI icon component
web/app/components/base/icons/src/public/llm/OpenaiBlue.json Deleted blue variant icon data file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

4 participants