Show the Kimi logo for Kimi models in the model picker - #14820
Draft
warp-agent-staging[bot] wants to merge 2 commits into
Draft
Show the Kimi logo for Kimi models in the model picker#14820warp-agent-staging[bot] wants to merge 2 commits into
warp-agent-staging[bot] wants to merge 2 commits into
Conversation
Kimi models arrive from the server as `LLMProvider::Unknown`, so `model_leading_icon` fell through to the `Icon::Agent` fallback and every Kimi row rendered the Warp glyph. - `app/assets/bundled/svg/kimi.svg`: the Kimi mark in the repo's bundled-icon convention (24x24 viewBox, single tintable path). - `Icon::KimiLogo` in `crates/warp_core/src/ui/icons.rs`. - `is_kimi_model` in `app/src/ai/llms.rs`, matched on the model id because the server-driven `LLMProvider` enum has no Moonshot/Kimi variant. It is checked after the custom-router / auto / Bedrock / Gemini-Enterprise branches so that existing icon precedence is unchanged. Co-Authored-By: Warp Agent <agent@warp.dev>
The Kimi branch in `model_leading_icon` matches on the model id, but both model surfaces also list the user's custom-endpoint models, whose synthetic `LLMInfo` uses the endpoint model's `config_key` as its id. A BYO endpoint whose config key happened to start with `kimi-` would have rendered Kimi's trademark despite the client having no provider provenance for it. Thread `is_custom_endpoint` through `ModelIconFlags`, sourced at both call sites from `LLMPreferences::custom_llm_info_for_id` like the existing flags, and exclude those rows from the Kimi predicate. 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.
Description
Every Kimi model in the model picker rendered the Warp glyph.
model_leading_icon(app/src/ai/llms.rs) ends inllm.provider.icon().unwrap_or(Icon::Agent), and the server reports the Kimi models (kimi-k26-fireworks,kimi-k27-code-fireworks,kimi-k3-fireworks) asLLMProvider::Unknown— which has no logo — so they fell through to theIcon::Agentfallback while OpenAI, Anthropic, Google and xAI each resolved to their own mark.This adds the Kimi mark and wires it up:
app/assets/bundled/svg/kimi.svg— the Kimi monogram in the repo's bundled-icon convention (24×24 viewBox, single tintable path with the#FF0000placeholder fill used bygrok.svg/openai.svg/claude.svg). Bundled icons are rendered monochrome and coloured by the call site, so one asset covers light and dark themes at every size the picker uses.Icon::KimiLogoincrates/warp_core/src/ui/icons.rs(enum variant + path mapping), declared alongsideClaudeLogo/GeminiLogo/GrokLogo/OpenAILogo.is_kimi_modelinapp/src/ai/llms.rs, branched intomodel_leading_icon.ModelIconFlags::is_custom_endpoint, computed at both call sites fromLLMPreferences::custom_llm_info_for_idlike the existing flags.Why match on the model id rather than the provider.
LLMProvideris generated from the server's GraphQL enum (OpenAI | Anthropic | Google | Xai | Unknown); there is no Moonshot/Kimi variant, and adding one requires a server-side schema change. Following the existingis_custom_router_id/is_autoprecedent,is_kimi_modelmatches the id (kimiexactly, or a case-insensitivekimi-prefix) rather than the display name, so an unrelated id that merely contains the letters —kimimaro-7b,gpt-kimi— does not match.Custom-endpoint models are excluded. Both surfaces also list the user's configured custom/BYO endpoints, and those synthetic
LLMInfos use the endpoint model's persistedconfig_keyas theirid(custom_llm_info_from,app/src/ai/llms.rs). Aconfig_keycarries no provider provenance, so an endpoint namedkimi-anythingwould otherwise have been given Kimi's trademark.ModelIconFlags::is_custom_endpointgates the Kimi branch off for those rows; they keep the generic fallback.The new branch sits after the custom-router / auto / Bedrock / Gemini-Enterprise branches and before the provider fallback, so existing icon precedence is untouched: a Kimi model routed through Bedrock still shows the AWS mark, and an auto row still shows the generic agent glyph.
Out of scope: the input footer's model chip.
render_model_section(app/src/terminal/profile_model_selector.rs) renders the model name plus a chevron and never callsmodel_leading_icon, so no model of any provider gets a logo there today.model_leading_iconhas exactly two call sites — the inline picker (app/src/terminal/input/models/data_source.rs) and the model menus (app/src/ai/execution_profiles/model_menu_items.rs) — and both are fixed by this change.Linked Issue
No tracked issue — requested directly in Slack: https://warpdev.slack.com/archives/C0BDQDW8V5E/p1786075128189149
Testing
Three unit tests in
app/src/ai/llms_tests.rs, alongside the existingmodel_leading_iconprecedence tests:kimi_models_are_matched_by_id_not_by_provider—kimi,kimi-k26-fireworksandKIMI-K3-Fireworksall resolve toIcon::KimiLogowhile their provider is stillUnknown;kimimaro-7b,gpt-kimiandgpt-oss-120bkeep theIcon::Agentfallback.kimi_models_keep_the_existing_router_auto_and_host_precedence— a Kimi id still yieldsDataflow/Agent/Aws/GeminiEnterpriseAgentPlatformunder the corresponding flags.custom_endpoint_models_never_get_the_kimi_logo— a realbuild_custom_llm_infosrow built from an endpoint whoseconfig_keyiskimi-anythingkeepsIcon::Agent, while the sameLLMInfowithout the flag still resolves toIcon::KimiLogo(so the flag, not the id shape, is what excludes it).Checks run on this branch:
./script/format— clean.cargo clippy -p warp_core -p warp --all-targets --tests -- -D warnings— clean (exit 0).cargo nextest run -p warp -E 'test(llms)'— 36 passed, including all three new tests and the pre-existing auto/host precedence tests.I have manually tested my changes locally with a local build (
cargo build --bin warp, run on Linux).Manual verification. Captured on a locally built internal (
--bin warp) client on Linux, driving the real/MODELpicker from an Agent Mode conversation. The model list is the real staging catalogue fetched by the signed-in client — nothing about the model list or the icon path was stubbed;available_model_menu_items→model_leading_icon→Icon::KimiLogoruns as production code.kimi k2.6,kimi k2.7 code,kimi k3— render the Kimi monogram (an angularKwith a detached rounded pill at the upper right).inkling,minimax 2.7,minimax 3,qwen 3.6/3.7 plus,deepseek v4 pro,gpt-oss 120bandmuse spark 1.2are allUnknown-provider models too, so they still render theIcon::AgentWarp glyph — which is exactly what the Kimi rows looked like before this change. The Kimi rows in the same list now render a visibly different mark.claude *rows still show the Anthropic starburst,gpt-5.*the OpenAI knot,grok *the Grok arc-and-slash,gemini *the Gemini mark, and theauto *rows the generic agent glyph.kimi k2.6updates the footer chip tokimi k2.6 (fireworks). That chip shows no provider logo — expected, and unchanged:render_model_sectionnever renders one for any model.Disclosure on how the signed-in session was reached. This sandbox carries only a service-account
WARP_API_KEY. The client's startup API-key sign-in is gated behind establishing staging IAP transit first (authenticate_user_after_iap_access), and the injectedWARP_STAGING_IAP_BOOTSTRAP_JWThad already expired (15-minute lifetime), so IAP came upAccessUnavailableand sign-in never started — leaving the app on the logged-out onboarding screen with all AI surfaces gated. Re-minting that bootstrap JWT withoz federate issue-tokenand re-launching restored IAP transit, after which the client's own API-key sign-in completed normally. No source was patched and no auth predicate was forced; the branch diff is exactly the icon asset, the source files and the test file listed above, and the working tree was clean at push time.Screenshots / Videos
Captured at
df132cb. The follow-up commit only narrows which rows qualify for the logo (custom endpoints are now excluded), which no server-catalogue row in these captures is, so they still show the shipped behavior; that case is covered bycustom_endpoint_models_never_get_the_kimi_logo.Computer-use video recording
Opening Warp model picker and inspecting kimi model glyphs: Opens Warp's AI model picker, filters to kimi models, clears the filter to compare glyphs with other models, then selects a kimi model and returns to the input.
Computer-use screenshots (3)
Model picker filtered to kimi rows (kimi k2.6, kimi k2.7 code, kimi k3), each with a small capital-K-like glyph plus a detached dot at upper right to the left of the label.
Unfiltered model list showing kimi rows (K-glyph) alongside grok rows (Warp-independent circle-with-slash) and inkling / minimax rows (the unchanged
Icon::AgentWarp glyph), allowing side-by-side comparison.Agent input footer after selecting a kimi model — the model chip reads "kimi k2.6 (fireworks)". The footer chip renders no provider logo for any model; this surface is unchanged.
Agent Mode
CHANGELOG-IMPROVEMENT: Kimi models now show the Kimi logo in the model picker instead of the Warp logo.
Conversation: https://staging.warp.dev/conversation/a9dc6e6d-1e4f-4cff-9e77-3c75aa8f020e
Run: https://oz.staging.warp.dev/runs/019fda6a-16a0-7d3f-80a1-0140957d8966
This PR was generated with Oz.