Commit 3073669
committed
feat(icons): orphan-icon sweep — patch stale OWUI rows not in current pipes() catalog
OWUI never cleans up its model table after a provider deprecates a
model — the row stays with the default placeholder icon (or the old
/static/favicon.png) because the existing _sync_model_icons() only
iterates the current pipes() output. Six active models on the live
deployment (baidu/ernie-4.5-21b-a3b, alfredpros/codellama-7b-instruct-solidity,
minimax/minimax-m2.5:free, upstage/solar-pro-3, baidu/qianfan-ocr-fast,
baidu/ernie-4.5-21b-a3b-thinking) were stuck like this.
New _sync_orphan_db_icons() runs right after _sync_model_icons() and
walks every active openrouter_pipe.* row in the model table. For each
row whose icon is OWUI-managed (data:, /static/, our CDN list, etc.)
it computes the right icon via _get_provider_icon() — same fallback
chain as the regular sync — and patches the meta. User-set custom
icons stay untouched.
Uses Models.get_all_models() (returns ModelModel with is_active/meta/
params; the trimmed-down get_models() variant lacks is_active).1 parent 908726d commit 3073669
1 file changed
Lines changed: 79 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1345 | 1345 | | |
1346 | 1346 | | |
1347 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1348 | 1353 | | |
1349 | 1354 | | |
1350 | 1355 | | |
| |||
1566 | 1571 | | |
1567 | 1572 | | |
1568 | 1573 | | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
1569 | 1648 | | |
1570 | 1649 | | |
1571 | 1650 | | |
| |||
0 commit comments