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-16 13:44:40 +02:00
parent f9f41f6480
commit c9462ce786
@@ -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(/^~/, '')}`;
}
/**