chore: remove icon_large of models#77
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.
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