-
Notifications
You must be signed in to change notification settings - Fork 0
chore: remove icon_large of models #77
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
base: greptile_combined-20260114-qodo-grep-copilot_base_chore_remove_icon_large_of_models_pr267
Are you sure you want to change the base?
Conversation
Greptile SummaryThis PR removes the Critical Issues Found:
Changes Summary:
Confidence Score: 0/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant ModelProviderService
participant ProviderEntity
participant SimpleProviderEntity
participant ModelProviderFactory
Client->>ModelProviderService: get_provider_icon(provider, icon_type)
ModelProviderService->>ModelProviderFactory: get_provider_icon(provider, icon_type, lang)
ModelProviderFactory->>ProviderEntity: get_provider_schema(provider)
alt icon_type == "icon_small"
ModelProviderFactory->>ProviderEntity: access icon_small field
else icon_type == "icon_small_dark"
ModelProviderFactory->>ProviderEntity: access icon_small field (BUG: should be icon_small_dark)
else other
ModelProviderFactory-->>ModelProviderService: raise ValueError
end
ModelProviderFactory-->>Client: return icon bytes and mime type
|
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.
Additional Comments (4)
-
api/core/entities/model_entities.py, line 41-48 (link)syntax:
icon_largeparameter is passed tosuper().__init__()on line 46, but the field was removed from the class definition (line 32). This will cause a TypeError at runtime. -
api/core/model_runtime/entities/provider_entities.py, line 154-161 (link)logic:
icon_small_darkis being set toself.icon_smallinstead ofself.icon_small_dark. This loses the dark icon information and assigns the small icon to both fields. -
api/core/model_runtime/model_providers/model_provider_factory.py, line 303-310 (link)logic: When retrieving the
icon_small_darkicon, the code reads fromprovider_schema.icon_smallinstead ofprovider_schema.icon_small_dark, causing the wrong icon to be returned. -
api/services/entities/model_provider_entities.py, line 91-100 (link)logic: Line 95 checks
if self.icon_small is not Noneinstead ofif self.icon_small_dark is not None, causingicon_small_darkto only be set whenicon_smallexists. This breaks the logic for setting dark icon URLs.
13 files reviewed, 4 comments
Benchmark PR from qodo-benchmark#267