feat(channels): add bailian_anthropic and moonshot_coding channel types with UI checkbox support#1455
Conversation
…es with UI checkbox support - Add bailian_anthropic (Anthropic format) at https://dashscope.aliyuncs.com/apps/anthropic - Add moonshot_coding (Kimi Coding endpoint) at https://api.kimi.com/coding - Both use anthropic/messages format with anthropic.PlatformDirect transformer - Implement checkbox UI pattern (like Gemini Vertex/Anthropic AWS) for Kimi Coding selection - Fix handleKimiCodingChange to properly update form.type and form.baseURL on toggle - Add English/Chinese i18n keys for new channel types and Kimi Coding checkbox - Update Ent schema, channel configs, provider mappings, and generated code Follows dual/triple-channel pattern used by Minimax, Moonshot, Doubao providers.
There was a problem hiding this comment.
Code Review
This pull request introduces support for new channel types, specifically bailian_anthropic and moonshot_coding, across the frontend configuration, backend schema, and server logic. The changes include updating the channel action dialog to handle the new Kimi Coding option, adding configuration data for the new providers, and implementing the corresponding outbound transformers in the backend. A review comment suggests refactoring the backend logic to group the new channel types with existing ones that share identical transformer configurations to reduce code duplication.
Greptile SummaryThis PR adds two new channel types —
Confidence Score: 5/5Safe to merge — all layers are consistently updated and the previous thread's type-safety concern is resolved The change is a well-scoped addition following established patterns. Backend enum validation, Ent schema, GraphQL, frontend Zod schema, provider/channel configs, and locales are all updated in lock-step. The frontend/src/features/channels/components/channels-action-dialog.tsx — the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects Provider] --> B{Provider?}
B -->|bailian| C[API Format Dropdown]
C -->|anthropic/messages| D[derivedChannelType = bailian_anthropic]
C -->|openai/chat_completions| E[derivedChannelType = bailian]
B -->|moonshot| F[API Format Dropdown]
F -->|anthropic/messages| G{useKimiCoding checkbox}
G -->|checked| H[derivedChannelType = moonshot_coding]
G -->|unchecked| I[derivedChannelType = moonshot_anthropic]
F -->|openai/chat_completions| J[derivedChannelType = moonshot]
D --> K[Backend: anthropic.PlatformDirect transformer]
H --> K
E --> L[Backend: bailian custom transformer]
I --> M[Backend: anthropic.PlatformMoonshot transformer]
J --> N[Backend: moonshot custom transformer]
Reviews (4): Last reviewed commit: "fix(channels): add type guard to Kimi Co..." | Re-trigger Greptile |
- Reset useKimiCoding on provider change, initialRow change, and dialog open/close - Merge TypeBailianAnthropic and TypeMoonshotCoding switch cases
No description provided.