fix: prompt for Moonshot platform during setup (moonshot.cn support)#8166
Closed
konsisumer wants to merge 2 commits into
Closed
fix: prompt for Moonshot platform during setup (moonshot.cn support)#8166konsisumer wants to merge 2 commits into
konsisumer wants to merge 2 commits into
Conversation
… keys Keys from platform.moonshot.cn only authenticate against api.moonshot.cn/v1, but setup previously hardcoded api.moonshot.ai/v1 for all non-Kimi-Code keys, causing a misleading 401 error. Now when a non-sk-kimi- key is entered, the setup flow asks which platform the key was created on and persists the correct base URL via KIMI_BASE_URL. Closes NousResearch#8096
The @whiskeysockets/baileys package is a git-based npm dependency (WhiskeySockets/Baileys#fix/abprops-abt-fetch) which requires git to be available during npm install.
0ef35f8 to
c8ace9d
Compare
This was referenced Apr 13, 2026
Contributor
|
Merged via PR #9172 which takes the full dual-provider approach (separate |
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
sk-kimi-API key, setup now asks which platform the key was created on: moonshot.ai (global) or moonshot.cn (China)KIMI_BASE_URLin.env, so runtime resolution picks it up automaticallyMOONSHOT_CN_BASE_URLconstant (https://api.moonshot.cn/v1) for consistent use across the codebaseTest plan
TestMoonshotCnEndpointtest class with 4 tests covering credential resolution, status check, and URL override behaviorCloses #8096