Skip to content

Commit a880b90

Browse files
committed
docs: refresh README + TESTING for icon system (v1.9.x–v1.10.1 catch-up)
README — icon feature bullet was stuck at the v1.6 phrasing ("13 hardcoded fast-path logos plus auto-discovered icons for ~20 more providers"). Updated to reflect the current v1.10.1 reality: 55+ hardcoded brand URLs, five-layer fallback chain (registry → hyphen-strip → _PROVIDER_ICONS → _PROVIDER_SLUG_ALIASES → provider-domain favicon → deterministic letter-SVG), 99.3% real brand coverage on the live VPS catalog. README — Advanced valves table: documented USE_PROVIDER_DOMAIN_FAVICON (default true), including the SPA-shell text/html discard behavior and the per-render trade-off when disabled. README — Architecture table: added the Provider-icons row with the four helpers (_get_provider_icon, _generate_letter_icon, _sync_orphan_db_icons, _resolve_maybe_awaitable) so the table now matches the icon-system commits between v1.9.0 and v1.10.1. TESTING — section 17 now covers the two new code paths: 17.2 → HF-avatar resolution for community providers without a corporate site 17.5/17.6 → USE_PROVIDER_DOMAIN_FAVICON on/off 17.7 → orphan-DB sweep for deprecated/withdrawn models No code change. All 939 unit tests still green.
1 parent 60064ad commit a880b90

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ control out of the box.
6464
- **Middle-out compression** — fits long prompts within context windows (`transforms: ["middle-out"]`).
6565
- **Cache control** — Anthropic-style `cache_control` injection on the longest message chunk.
6666
- **Citations**`[n]` references from web-search-enabled models are converted to markdown links.
67-
- **Provider icons**13 hardcoded fast-path logos plus auto-discovered icons for ~20 more providers (xAI, Inflection, NVIDIA, Arcee, Morph, Cerebras, …) lazy-loaded from OpenRouter's provider registry, all synced directly into Open WebUI's model database.
67+
- **Provider icons (99.3% real brand coverage)**55+ hardcoded fast-path logos (corporate favicons + HuggingFace community avatars) and a five-layer fallback chain (`_PROVIDER_ICONS` → hyphen-strip → `_PROVIDER_SLUG_ALIASES`OpenRouter registry → provider-domain favicon → deterministic letter-SVG) so every visible model gets a stable icon. Synced directly into Open WebUI's model database via `_sync_orphan_db_icons` (also patches OWUI rows for deprecated/withdrawn models that the regular sync skips).
6868
- **ZDR (Zero Data Retention)** — filter the catalog to ZDR-capable models (`ZDR_MODELS_ONLY`) and/or enforce ZDR per request (`ZDR_ENFORCE`).
6969
- **Tool-calling filter** — show all / only / exclude tool-capable models (`TOOL_CALLING_FILTER`).
7070
- **Provider preferences**`PROVIDER_ONLY` allowlist, `PROVIDER_QUANTIZATIONS`, `PROVIDER_ALLOW_FALLBACKS`, and `PROVIDER_MAX_PRICE_PROMPT/COMPLETION` price caps.
@@ -225,8 +225,9 @@ documented behaviour — most installs never need to change them.
225225
| `ENABLE_CACHE_CONTROL` | `OPENROUTER_ENABLE_CACHE_CONTROL` | `false` | Inject Anthropic `cache_control` on the longest message |
226226
| `ANTHROPIC_PROMPT_CACHE_TTL` | `OPENROUTER_ANTHROPIC_PROMPT_CACHE_TTL` | `5m` | TTL for the Anthropic ephemeral cache breakpoint: `5m` or `1h` |
227227
| `SHOW_GENERATION_ID` | `OPENROUTER_SHOW_GENERATION_ID` | `false` | Append the OpenRouter generation ID to each response (for `GET /generation?id=` lookups) |
228-
| `SYNC_PROVIDER_ICONS` | `OPENROUTER_SYNC_ICONS` | `true` | Sync provider icons into Open WebUI's model database |
228+
| `SYNC_PROVIDER_ICONS` | `OPENROUTER_SYNC_ICONS` | `true` | Sync provider icons into Open WebUI's model database (also runs `_sync_orphan_db_icons` to patch rows for deprecated/withdrawn models the regular sync skips) |
229229
| `USE_GSTATIC_FAVICONS` | `OPENROUTER_USE_GSTATIC_FAVICONS` | `false` | Allow registry-discovered Google gstatic favicons for providers without an OpenRouter-hosted icon. Off by default (avoids per-render requests to `t0.gstatic.com`) |
230+
| `USE_PROVIDER_DOMAIN_FAVICON` | `OPENROUTER_USE_PROVIDER_DOMAIN_FAVICON` | `true` | Fallback to the provider's own corporate-domain favicon when no hardcoded / registry / alias icon exists (and gstatic is blocked). HEAD-checked once per provider (cached) and only kept if the response is a real image MIME — SPA shell pages returning `text/html` are discarded so the deterministic letter-SVG fallback runs instead. Disable to skip per-render cross-origin requests to provider domains |
230231

231232
### Network
232233

@@ -291,6 +292,7 @@ The pipe implements the **Manifold** pattern: one pipe entry point that surfaces
291292
| OWUI file upload | `_owui_upload_bytes()` | Single shared helper backing every image / video / audio re-host through OWUI |
292293
| Security guards | `_is_openrouter_url()`, MIME / size / scheme whitelists | SSRF + auth-leak protection on media downloads, citation URL filter |
293294
| Enrichment | `_inject_cache_control()`, `_insert_citations()`, `_format_credit_info()` | Anthropic prompt-cache breakpoints, `[n]` → markdown links, opt-in credit footer (pre-warmed off the event loop) |
295+
| Provider icons | `_get_provider_icon()`, `_generate_letter_icon()`, `_sync_orphan_db_icons()`, `_resolve_maybe_awaitable()` | Five-layer fallback chain (registry → hyphen-strip → `_PROVIDER_ICONS``_PROVIDER_SLUG_ALIASES` → provider-domain favicon → deterministic letter-SVG), OWUI-managed-icon recognition, OWUI ≥ 0.4 async `Models.{get,update,insert}_model_by_id` resolver |
294296

295297
```text
296298
Open-WebUI-Pipe-OpenRouter/

TESTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,12 @@ Must exit with `All tests passed! ✓` and `✗ Failed: 0`. If any test fails, *
192192
| # | Action | Expected result |
193193
|---|--------|-----------------|
194194
| 17.1 | Open the model selector | Models from OpenAI, Anthropic, Google, Meta, etc. show their own icon |
195-
| 17.2 | Check an unknown provider (e.g. `aion-labs`) | No icon (empty field), no error |
195+
| 17.2 | Check a community provider with no corporate site (e.g. `alfredpros`, `upstage`) | HuggingFace-avatar icon appears (resolved through the hardcoded `_PROVIDER_ICONS` map) |
196196
| 17.3 | Leave `USE_GSTATIC_FAVICONS = false` (default) | Providers only resolvable via gstatic show OWUI's default icon (no `t0.gstatic.com` requests) |
197197
| 17.4 | Set `USE_GSTATIC_FAVICONS = true` | Registry-discovered gstatic favicons appear for extra providers |
198+
| 17.5 | Default `USE_PROVIDER_DOMAIN_FAVICON = true` for a provider with only a corporate domain (e.g. `cognitivecomputations`) | Provider-domain favicon used as fallback; HEAD-checked once, cached, real image MIME enforced (SPA `text/html` shells discarded) |
199+
| 17.6 | Set `USE_PROVIDER_DOMAIN_FAVICON = false` for the same provider | Falls through to the deterministic letter-SVG (single-letter colored square) instead of the corporate favicon |
200+
| 17.7 | Inspect OWUI DB rows for deprecated / withdrawn models after first `pipes()` call | Rows carry the resolved icon (patched by `_sync_orphan_db_icons` even though the model is no longer surfaced by `/models`) |
198201

199202
---
200203

0 commit comments

Comments
 (0)