-
Notifications
You must be signed in to change notification settings - Fork 20k
chore: remove icon_large of models #30466
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
Summary of ChangesHello @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 focuses on simplifying the model provider and model entity structures by eliminating the Highlights
🧠 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 AssistThe 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
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 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
|
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.
Code Review
This pull request systematically removes the icon_large property from various model and provider entities across the codebase. The changes are comprehensive, spanning backend entities, services, and factories, as well as frontend type definitions and tests. The logic that previously handled icon_large has been correctly updated to reflect its removal. The modifications are clean, consistent, and successfully achieve the goal of this refactoring task. Overall, this is a well-executed cleanup.
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 removes the deprecated icon_large field from model provider entities across the codebase, as it is no longer used by the frontend. The change is a clean refactoring that simplifies the data model.
Key Changes
- Removed
icon_largefield from all backend Python entity classes and service responses - Removed
icon_largefield from frontend TypeScript type declarations - Updated documentation and error handling to reflect that only
icon_smallandicon_small_darkicon types are supported
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
api/core/entities/model_entities.py |
Removed icon_large field from SimpleModelProviderEntity and DefaultModelProviderEntity classes |
api/core/model_runtime/entities/provider_entities.py |
Removed icon_large field from SimpleProviderEntity and ProviderEntity classes, and from to_simple_provider() method |
api/core/model_runtime/model_providers/model_provider_factory.py |
Updated docstring and error handling to support only icon_small and icon_small_dark, rejecting icon_large requests |
api/core/provider_manager.py |
Removed icon_large field from default model creation |
api/services/entities/model_provider_entities.py |
Removed icon_large field from ProviderResponse, ProviderWithModelsResponse, and related URL prefix logic |
api/services/model_provider_service.py |
Removed icon_large field from service methods and updated docstring to reflect supported icon types |
api/tests/integration_tests/model_runtime/__mock/plugin_model.py |
Removed icon_large field from mock plugin model provider data |
api/tests/test_containers_integration_tests/services/test_model_provider_service.py |
Removed icon_large field from test mock data across multiple test cases |
api/tests/unit_tests/core/test_provider_configuration.py |
Removed icon_large field from mock provider entity in test |
api/tests/unit_tests/services/test_model_provider_service_sanitization.py |
Removed icon_large field from test provider configuration |
web/app/components/header/account-setting/model-provider-page/declarations.ts |
Removed icon_large field from ModelProvider, Model, and DefaultModelResponse TypeScript type declarations |
web/app/components/plugins/plugin-detail-panel/model-selector/index.spec.tsx |
Removed icon_large field from test mock createModel() helper function |
web/app/components/app/configuration/debug/debug-with-single-model/index.spec.tsx |
Removed icon_large field from test mock data across multiple test cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Important
Fixes #<issue number>.Summary
fix #30465
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods