// AI provider logo SVGs — regex-based matching for self-hosted model names // Uses official logos from Simple Icons where available, custom minimal SVGs otherwise // All SVGs use viewBox="0 0 24 24" fill="currentColor" const _PROVIDERS = [ // Ollama [/ollama|:11434/i, ''], // OpenAI — GPT, o1, o3, dall-e, chatgpt [/openai|gpt-|^o[13]-|chatgpt|dall-e/i, ''], // OpenRouter [/openrouter|open router/i, ''], // Ollama / Ollama Cloud [/ollama/i, ''], // Anthropic — Claude (official Simple Icons) [/anthropic|claude/i, ''], // Google Gemini (official Simple Icons) [/google|gemini|gemma/i, ''], // Meta — Llama models (official Simple Icons). Exclude the llama.cpp / llama-cpp // / llamacpp inference engine — that's an independent project (ggml), not Meta. [/meta|llama(?![.\-_ ]?cpp)/i, ''], // Mistral AI (official Simple Icons). Match Mixtral and Ministral too. [/mi[sx]tral|ministral/i, ''], // Qwen (Tongyi Qianwen) — official geometric hexagonal logo [/qwen|alibaba/i, ''], // DeepSeek (official whale logo from LobeHub icons) [/deepseek/i, ''], // xAI — Grok (stylized X) [/x-ai|xai|grok/i, ''], // Cohere — Command (stylized C) [/cohere|command-r/i, ''], // Perplexity (official Simple Icons) [/perplexity|sonar/i, ''], // Nous Research / Hermes [/nous|hermes/i, ''], // Microsoft / Phi (four squares) [/microsoft|phi-/i, ''], // Zhipu AI — GLM, ChatGLM (official Z logo) [/zhipu|glm|chatglm/i, ''], // MiniMax [/minimax/i, ''], // Kimi / Moonshot AI (crescent moon) [/kimi|moonshot/i, ''], // NVIDIA / Nemotron (official Simple Icons) [/nvidia|nemotron/i, ''], ]; // Returns an SVG string for the given model ID, or null if no match export function providerLogo(modelId) { if (!modelId) return null; for (const [re, svg] of _PROVIDERS) { if (re.test(modelId)) return svg; } return null; } export default { providerLogo };