Show the Kimi logo for Kimi models in the model picker - #14821
Open
warp-agent-staging[bot] wants to merge 2 commits into
Open
Show the Kimi logo for Kimi models in the model picker#14821warp-agent-staging[bot] wants to merge 2 commits into
warp-agent-staging[bot] wants to merge 2 commits into
Conversation
Kimi models are served through Fireworks, which the server reports as `LlmProvider::UNKNOWN`, so they fell through to the `Icon::Agent` fallback and the picker branded them with the Warp "W". The provider enum can't carry the logo without adding a first-party Kimi provider end to end, so resolve the icon from the model's own names instead. The match is anchored to a leading `kimi` token so the other Fireworks-hosted families (GLM, MiniMax, Qwen, DeepSeek) are unaffected. The asset follows the bundled-icon convention (24x24 viewBox, single tintable path), so `warpui_core::elements::Icon` recolors it from the theme in both light and dark. Co-Authored-By: Warp Agent <agent@warp.dev>
Every Kimi model the server ships is `kimi-*`, so the name-scanning helper and its tests were more machinery than the mapping needs. Fold the check into a single branch on the model id. Co-Authored-By: Warp Agent <agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kimi models rendered the generic Warp agent glyph in the model picker instead of a provider logo.
Kimi is served through Fireworks, and the server reports Fireworks-hosted models as
LlmProvider::UNKNOWN.LLMProvider::icon()returnsNoneforUnknown, somodel_leading_iconfell through toIcon::Agentand the picker branded Kimi rows as Warp.Adding a first-party Kimi provider end to end (GraphQL enum + server mapping + BYOK plumbing) is out of scope for a logo, so the icon is keyed off the model id instead. Every Kimi model the server ships is
kimi-*(kimi-k25-fireworks,kimi-k26-fireworks,kimi-k27-code-fireworks,kimi-k3-fireworks), so a plainkimi-prefix check covers them and leaves the other Fireworks-hosted families (GLM, MiniMax, Qwen, DeepSeek) alone. The branch sits after the existing auto / custom-router / Bedrock / Gemini-Enterprise cases, so badge priority is unchanged.The asset is the official Kimi brand mark in the bundled-icon convention (24×24 viewBox, single tintable path), so
warpui_core::elements::Iconrecolors it from the theme — same shape as #14769 (Grok/xAI logo).Changes (+16 / -1 across 4 files):
app/assets/bundled/svg/kimi.svg— new bundled asset.crates/warp_core/src/ui/icons.rs—Icon::KimiLogovariant + path mapping.app/src/ai/llms.rs— oneis_kimi_modelbranch inmodel_leading_icon.app/src/terminal/view/ambient_agent/model_selector.rs— the ambient agent model list gets the same branch, so both pickers agree.Verification
No regression test — the requester explicitly waived it for this change ("It definitely doesn't need tests"). The behavior is a two-line icon mapping keyed off a literal id prefix. The pre-existing icon tests in
app/src/ai/llms_tests.rsare untouched and still pass (33/33 inai::llms::tests).Repository checks:
./script/format --check— clean.cargo clippy -p warp -p warp_core --all-targets --tests -- -D warningsandcargo clippy -p warp --features gui --all-targets --tests -- -D warnings— clean.Visual verification against a local
--features guibuild, driven through computer use on a real display:kimi k2.6,kimi k2.7 code,kimi k3all render the Kimi mark.glm 5.2,minimax 2.7,minimax 3,qwen 3.6 plus,qwen 3.7 plus,deepseek v4 proall still render the agent glyph — none picked up the Kimi logo.claude,gpt-5.x,gemini,grokicons unchanged; no blank or missing icons.These screenshots were captured before the diff was shrunk and still stand: the rework only collapsed how the Kimi model is recognised, and the same rows resolve to the same icons, so the rendered result is byte-for-byte the same.
Rework changes
Requester feedback: "I thought this should be a three-liner. It definitely doesn't need tests". Diff reduced from +127/-3 across 5 files to +16/-1 across 4 files.
app/src/ai/llms_tests.rs(85 lines) per the explicit waiver above. That file is now absent from the diff entirely.model_provider_icon/is_kimi_model/starts_with_kimi_tokentrio and its multi-field name scan with a singleis_kimi_modelone-liner matching thekimi-id prefix, plus one branch inmodel_leading_icon. Doc comment cut to two lines.kimi-would not pick up the logo. Every id in the current catalogue does.kimi.svgand theicons.rsmapping as-is.CHANGELOG-IMPROVEMENT: Kimi models now show the Kimi logo in the model picker.
Originating thread: https://warpdev.slack.com/archives/C0BDQDW8V5E/p1786075084680309
Computer-use screenshots (4)
Model picker filtered to 'kimi', showing kimi k2.6, kimi k2.7 code, and kimi k3, each with an angular stylized lowercase-k leading icon.
Unfiltered model picker scrolled to show the three kimi rows (angular-k icons) directly alongside minimax 2.7/3 and qwen 3.6/3.7 plus rows (bar-chart icons).
Model picker showing deepseek v4 pro and glm 5.2 (both bar-chart icons) alongside gemini rows (triangle-in-box icons) and gpt-5 rows (circle icons).
Model picker showing claude sonnet 5 rows (sparkle icons), deepseek v4 pro (bar-chart icon), and gemini rows (triangle-in-box icons).
Conversation: https://staging.warp.dev/conversation/d5d0a2ba-75ae-46fe-af56-5858937d1ce3
Run: https://oz.staging.warp.dev/runs/019fda75-5304-78cf-a0c0-87d624790025
This PR was generated with Oz.