mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-21 21:14:20 +00:00
b02c9517f6
Adding a Kimi/Moonshot provider failed model scanning out of the box for CN-region API keys: the single preset defaulted its base URL to the global endpoint `https://api.moonshot.ai/v1`, but CN-issued keys are only valid against `https://api.moonshot.cn/v1`, so scanning returned `401 Invalid Authentication`. Flipping the default would just move the breakage to international keys, since the base_url field is plain free-text and either region is equally common. Instead, offer two clearly labelled presets, mirroring how the Lark adapter exposes feishu.cn vs larksuite.com: - `moonshot-chat-completions` -> "Moonshot / Kimi (Global · api.moonshot.ai)" - `moonshot-cn-chat-completions` -> "Moonshot / Kimi (China · api.moonshot.cn)" The existing component name is kept unchanged so provider rows already in the DB keep resolving; only its display label is clarified. Both presets keep base_url as a free-text field, so users behind a proxy / one-api gateway can still enter a custom endpoint. Both carry the same `kimi` search aliases so either shows up when searching. Fixes #2232