From c9462ce786a414b2f5831bcbef69229c7c94e990 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Wed, 16 Sep 2026 13:44:40 +0200 Subject: [PATCH] ui : strip provider tilde prefix from hub avatar urls Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash --- tools/ui/src/lib/services/huggingface.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ui/src/lib/services/huggingface.service.ts b/tools/ui/src/lib/services/huggingface.service.ts index 1fdccd0660..f30fa5fcc2 100644 --- a/tools/ui/src/lib/services/huggingface.service.ts +++ b/tools/ui/src/lib/services/huggingface.service.ts @@ -378,7 +378,9 @@ export class HuggingFaceService { * exist, so callers should provide a fallback. */ static getAvatarUrl(author: string): string { - return `${HF_AVATARS_URL}${PATH_SEPARATOR}${author}`; + // OpenRouter-style model ids prefix the provider with a tilde + // (`~openai/gpt-...`); the avatars endpoint only resolves bare names + return `${HF_AVATARS_URL}${PATH_SEPARATOR}${author.replace(/^~/, '')}`; } /**