Commit 30b9413
fix: resolve 5 bugs preventing provider icons from appearing in Open WebUI
_sync_model_icons() was silently failing to set provider icons due to a
chain of five bugs:
1. Wrong skip condition: `if existing_icon: continue` treated OWUI's
default data: SVG icon (assigned to all manifold models on load) as a
user-set custom icon, so provider icons were never applied after the
first pipe load. Fixed via new _is_owui_managed_icon() helper that
distinguishes OWUI/our URLs from genuine user customisations.
2. Race condition: _sync_model_icons() ran before pipes() returned,
meaning OWUI had not yet inserted the models into its DB. OWUI then
inserted them with its default icon, overwriting any early record.
Fixed by also calling _sync_model_icons() on cache-hit paths until all
models are confirmed synced (second call arrives after OWUI registration).
3. Exception handler blocked retry: DB errors added the model_id to
_icons_synced anyway, permanently preventing retry. Removed the
erroneous add.
4. Insert prematurely marked synced: after insert_new_model the model was
added to _icons_synced even though OWUI could overwrite it immediately
after. Icon confirmation now requires a successful update_model_by_id.
5. User params clobbered: update_model_by_id passed an empty ModelParams(),
erasing user-configured temperature/system-prompt/etc. The update now
preserves existing.params.
Also caches function_id in __init__ (was re-evaluated on every call).
Tests: updated 25e/25f/25g for new semantics; added 25h (update path when
OWUI default icon present) and 25i (_is_owui_managed_icon unit tests).
All 262 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 9f977da commit 30b9413
3 files changed
Lines changed: 147 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
| |||
240 | 255 | | |
241 | 256 | | |
242 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
243 | 263 | | |
244 | 264 | | |
245 | 265 | | |
| |||
274 | 294 | | |
275 | 295 | | |
276 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
277 | 302 | | |
278 | 303 | | |
279 | 304 | | |
| |||
456 | 481 | | |
457 | 482 | | |
458 | 483 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
467 | 496 | | |
468 | 497 | | |
469 | 498 | | |
| |||
477 | 506 | | |
478 | 507 | | |
479 | 508 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
| 509 | + | |
| 510 | + | |
487 | 511 | | |
| 512 | + | |
488 | 513 | | |
489 | 514 | | |
490 | 515 | | |
| |||
509 | 534 | | |
510 | 535 | | |
511 | 536 | | |
512 | | - | |
513 | 537 | | |
514 | 538 | | |
515 | 539 | | |
516 | 540 | | |
517 | 541 | | |
518 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
519 | 551 | | |
520 | 552 | | |
521 | 553 | | |
522 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
523 | 559 | | |
524 | 560 | | |
525 | 561 | | |
| |||
530 | 566 | | |
531 | 567 | | |
532 | 568 | | |
533 | | - | |
| 569 | + | |
534 | 570 | | |
535 | 571 | | |
536 | 572 | | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
547 | 591 | | |
548 | 592 | | |
549 | 593 | | |
550 | 594 | | |
| 595 | + | |
551 | 596 | | |
552 | | - | |
553 | 597 | | |
554 | 598 | | |
555 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
1380 | 1381 | | |
1381 | 1382 | | |
1382 | 1383 | | |
1383 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
| |||
1389 | 1392 | | |
1390 | 1393 | | |
1391 | 1394 | | |
1392 | | - | |
1393 | 1395 | | |
1394 | 1396 | | |
1395 | | - | |
1396 | | - | |
| 1397 | + | |
| 1398 | + | |
1397 | 1399 | | |
1398 | 1400 | | |
1399 | 1401 | | |
1400 | | - | |
| 1402 | + | |
1401 | 1403 | | |
1402 | 1404 | | |
1403 | | - | |
1404 | 1405 | | |
1405 | 1406 | | |
1406 | | - | |
| 1407 | + | |
| 1408 | + | |
1407 | 1409 | | |
1408 | 1410 | | |
| 1411 | + | |
1409 | 1412 | | |
1410 | | - | |
| 1413 | + | |
1411 | 1414 | | |
1412 | 1415 | | |
1413 | 1416 | | |
| |||
1416 | 1419 | | |
1417 | 1420 | | |
1418 | 1421 | | |
1419 | | - | |
1420 | 1422 | | |
1421 | 1423 | | |
1422 | | - | |
1423 | 1424 | | |
1424 | 1425 | | |
1425 | 1426 | | |
| |||
1440 | 1441 | | |
1441 | 1442 | | |
1442 | 1443 | | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | 1444 | | |
1447 | 1445 | | |
1448 | 1446 | | |
| |||
1453 | 1451 | | |
1454 | 1452 | | |
1455 | 1453 | | |
1456 | | - | |
| 1454 | + | |
| 1455 | + | |
1457 | 1456 | | |
1458 | | - | |
1459 | | - | |
| 1457 | + | |
| 1458 | + | |
1460 | 1459 | | |
1461 | 1460 | | |
1462 | | - | |
1463 | 1461 | | |
1464 | 1462 | | |
1465 | | - | |
| 1463 | + | |
1466 | 1464 | | |
1467 | 1465 | | |
| 1466 | + | |
1468 | 1467 | | |
1469 | 1468 | | |
1470 | 1469 | | |
1471 | 1470 | | |
| 1471 | + | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
1479 | 1478 | | |
1480 | 1479 | | |
1481 | | - | |
1482 | 1480 | | |
1483 | 1481 | | |
1484 | 1482 | | |
1485 | | - | |
| 1483 | + | |
1486 | 1484 | | |
1487 | 1485 | | |
1488 | 1486 | | |
1489 | | - | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1490 | 1492 | | |
1491 | 1493 | | |
1492 | | - | |
1493 | 1494 | | |
1494 | 1495 | | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1495 | 1537 | | |
1496 | 1538 | | |
1497 | 1539 | | |
| |||
0 commit comments