feat: Kimi/Moonshot partnership promotion POC#369
Open
Conversation
Add Moonshot/Kimi as a first-class provider template with promotional UI treatment across LLM Providers and LLM Chat & Hub settings pages. - Add 'moonshot' provider type to shared schema, server adapter, and frontend - Add Kimi template as first quick provider template (Moonshot API endpoint) - Add "Free model Sponsored by Kimi K2.5" badge on BrowserOS provider card - Add Kimi at top of LLM Hub defaults with orange glow and "Try Kimi" badge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review caught two additional PROVIDER_FACTORIES records missing the moonshot mapping — the SDK LLM client and agent tool-loop paths would have thrown "Unknown provider" at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR adds Moonshot/Kimi as a partnership promotion across the BrowserOS agent. The implementation consistently adds Key changes:
Minor concern:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens LLM Settings] --> B{Selects Provider}
B -->|New Provider| C[NewProviderDialog]
C --> D[moonshot first in providerTypeEnum]
C --> E[Select Moonshot/Kimi template]
E --> F[Pre-fills API URL & model]
B -->|Existing Provider| G[ProviderCard]
G -->|BrowserOS provider| H{Check provider.type}
H -->|type === 'browseros'| I[Show Kimi K2.5 sponsorship badge]
J[User opens LLM Hub] --> K[Load DEFAULT_PROVIDERS]
K --> L[Kimi at top of list]
L --> M[HubProviderRow]
M -->|Check provider.name| N{name === 'Kimi'?}
N -->|Yes| O[Apply orange glow + Try Kimi badge]
N -->|No| P[Standard styling]
Q[Server receives request] --> R{Provider type?}
R -->|moonshot| S[createMoonshotFactory]
S --> T[createOpenAICompatible]
T --> U[Vercel AI SDK]
style D fill:#ff9800
style I fill:#ff9800
style O fill:#ff9800
style S fill:#ff9800
Last reviewed commit: 7579aff |
Comment on lines
80
to
84
| {isBuiltIn && ( | ||
| <span className="mb-1 inline-block rounded-full bg-gradient-to-r from-orange-500 to-amber-500 px-3 py-0.5 font-semibold text-white text-xs"> | ||
| Free model Sponsored by Kimi K2.5 | ||
| </span> | ||
| )} |
Contributor
There was a problem hiding this comment.
Badge shows for ALL built-in providers, but PR description says it should only show "on the BrowserOS built-in provider card". Need to check provider.type === 'browseros' instead of just isBuiltIn.
Suggested change
| {isBuiltIn && ( | |
| <span className="mb-1 inline-block rounded-full bg-gradient-to-r from-orange-500 to-amber-500 px-3 py-0.5 font-semibold text-white text-xs"> | |
| Free model Sponsored by Kimi K2.5 | |
| </span> | |
| )} | |
| {isBuiltIn && provider.type === 'browseros' && ( | |
| <span className="mb-1 inline-block rounded-full bg-gradient-to-r from-orange-500 to-amber-500 px-3 py-0.5 font-semibold text-white text-xs"> | |
| Free model Sponsored by Kimi K2.5 | |
| </span> | |
| )} |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/agent/entrypoints/app/ai-settings/ProviderCard.tsx
Line: 80-84
Comment:
Badge shows for ALL built-in providers, but PR description says it should only show "on the BrowserOS built-in provider card". Need to check `provider.type === 'browseros'` instead of just `isBuiltIn`.
```suggestion
{isBuiltIn && provider.type === 'browseros' && (
<span className="mb-1 inline-block rounded-full bg-gradient-to-r from-orange-500 to-amber-500 px-3 py-0.5 font-semibold text-white text-xs">
Free model Sponsored by Kimi K2.5
</span>
)}
```
How can I resolve this? If you propose a fix, please make it concise.Address Greptile review: add explicit provider.type check to ensure badge only renders for the BrowserOS provider. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
https://api.moonshot.ai/v1, modelkimi-k2-0905-preview)moonshotas a recognized provider type across shared schema, all 3 server provider factories, and frontendDesign
Moonshot API is OpenAI-compatible, so the server uses
createOpenAICompatiblefor the factory — no new adapter code. Frontend changes addmoonshotto theProviderTypeunion, provider templates, icons (usingKimifrom@lobehub/icons), models data, and form schema. The promotional styling uses existing--accent-orangeCSS variables and Tailwind utilities.13 files changed across
packages/shared,apps/server, andapps/agent.Test plan
bun run --filter @browseros/server typecheck)🤖 Generated with Claude Code