mirror of
https://github.com/coder/coder.git
synced 2026-10-16 14:48:56 +08:00
## Problem OpenRouter is a supported provider type (AI Bridge, AI settings, model selectors), but it had no icon. Everywhere else shows a provider logo, OpenRouter fell back to the generic `Building2` glyph (or a question mark in AI Bridge), which looks like a broken or unknown provider. ## Fix Added the OpenRouter logo from [Simple Icons](https://github.com/simple-icons/simple-icons/blob/develop/icons/openrouter.svg) and wired it into both provider icon maps. | File | Change | |---|---| | `site/static/icon/openrouter.svg` | New asset, path coordinates baked into the repo's 256x256 viewBox with a white fill, matching `anthropic.svg` | | `site/src/modules/aiModels/ProviderIcon.tsx` | Map `openrouter` to the new icon | | `site/src/pages/AIBridgePage/icons/AIBridgeProviderIcon.tsx` | Same mapping for the AI Bridge provider icon | | `site/src/theme/externalImages.ts` | Register as `monochrome` so it adapts to light and dark themes | | `site/src/theme/icons.json` | Regenerated with `make site/src/theme/icons.json` | | `site/src/modules/aiModels/ProviderIcon.stories.tsx` | Add an `OpenRouter` story, drop OpenRouter from the fallback comment | Provider labels already existed in `formatProviderLabel` and `addableProviderTypes`, so only the icon was missing. ## Validation - Rendered the icon in headless Chromium on dark and light backgrounds with the light-theme monochrome filter applied, to confirm geometry and contrast. - Audited all 148 icons in `site/static/icon`: every one uses a `0 0 256 256` viewBox, and 145 now carry baked coordinates with no geometry transform. The upstream 24x24 path was scaled into 256 space so this icon follows that convention rather than relying on a wrapper `scale()`. The baked version renders byte-identical to the transform-based version. - `pnpm exec tsc --noEmit`: clean - `pnpm exec biome check` on the touched directories: clean - `pnpm exec vitest run --project unit src/modules/aiModels src/pages/AIBridgePage/utils.test.ts`: 185 passed > 🤖 This PR was created with the help of Coder Agents, and needs a human review. 🧑💻