ui : strip provider tilde prefix from hub avatar urls

Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
Aleksander Grygier
2026-09-29 13:54:54 +02:00
parent 1f80cfd4f0
commit ad66d0d572
@@ -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(/^~/, '')}`;
}
/**