[GH-ISSUE #4674] [BUG]: Moonshot AI provider shows empty model list in desktop v1.9.0 (Windows) #2962

Closed
opened 2026-02-22 18:32:03 -05:00 by yindo · 4 comments
Owner

Originally created by @MaoFeidu on GitHub (Nov 21, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4674

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Describe the bug

In AnythingLLM desktop v1.9.0 for Windows, selecting the built-in “Moonshot AI” provider and pasting a valid API key leaves the “Model” drop-down empty. As a result the workspace cannot be saved. The same key works fine when Generic OpenAI provider is used with endpoint https://api.moonshot.cn/v1 and any kimi-k2-0905-preview model manually typed in.

To Reproduce

Settings → LLM Preference → Provider → choose “Moonshot AI”
Paste a fresh Moonshot API key (sk-…)
Open “Model” drop-down → list is completely empty
Try to create/save a workspace → validation fails because no model is selected

Expected behavior

After step 2 the model list should populate with at least
moonshot-v1-8k
moonshot-v1-32k
moonshot-v1-128k
so the user can pick one and save the workspace.

Screenshots

Image

Desktop :

OS: Windows 11 24H2 (build 26100)
AnythingLLM version: 1.9.0 (desktop, downloaded from anythingllm.com)
Installation method: anythingllm-desktop-Setup-1.9.0.exe

Additional context
The key itself is valid: Generic OpenAI provider + same key + base URL https://api.moonshot.cn/v1 + model name kimi-k2-0905-preview chats normally.
Work-around is to keep using Generic OpenAI, but native provider would be cleaner.

Suggested fix
Add the same /v1/models fetch logic that other first-class providers use, or hard-code the three model names if the endpoint is not yet ready.
Thank you!

Are there known steps to reproduce?

No response

Originally created by @MaoFeidu on GitHub (Nov 21, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4674 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? **Describe the bug** In AnythingLLM desktop v1.9.0 for Windows, selecting the built-in “Moonshot AI” provider and pasting a valid API key leaves the “Model” drop-down empty. As a result the workspace cannot be saved. The same key works fine when Generic OpenAI provider is used with endpoint https://api.moonshot.cn/v1 and any kimi-k2-0905-preview model manually typed in. **To Reproduce** Settings → LLM Preference → Provider → choose “Moonshot AI” Paste a fresh Moonshot API key (sk-…) Open “Model” drop-down → list is completely empty Try to create/save a workspace → validation fails because no model is selected **Expected behavior** After step 2 the model list should populate with at least moonshot-v1-8k moonshot-v1-32k moonshot-v1-128k so the user can pick one and save the workspace. **Screenshots** <img width="674" height="404" alt="Image" src="https://github.com/user-attachments/assets/c43e0546-b210-4b26-9c3b-44eda4550eff" /> **Desktop :** OS: Windows 11 24H2 (build 26100) AnythingLLM version: 1.9.0 (desktop, downloaded from anythingllm.com) Installation method: anythingllm-desktop-Setup-1.9.0.exe **Additional context** The key itself is valid: Generic OpenAI provider + same key + base URL https://api.moonshot.cn/v1 + model name kimi-k2-0905-preview chats normally. Work-around is to keep using Generic OpenAI, but native provider would be cleaner. **Suggested fix** Add the same /v1/models fetch logic that other first-class providers use, or hard-code the three model names if the endpoint is not yet ready. Thank you! ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:03 -05:00
yindo closed this issue 2026-02-22 18:32:03 -05:00
Author
Owner

@timothycarambat commented on GitHub (Nov 21, 2025):

Are you sure the API is correct and/or internet connection is valid - cannot replicate in current desktop build or docker build

Image Image
@timothycarambat commented on GitHub (Nov 21, 2025): Are you sure the API is correct and/or internet connection is valid - cannot replicate in current desktop build or docker build <img width="1784" height="983" alt="Image" src="https://github.com/user-attachments/assets/c928b6a9-c68d-4c05-b2f4-80b53e6652f5" /> <img width="1517" height="1003" alt="Image" src="https://github.com/user-attachments/assets/98388cd9-4c14-42a9-b95d-d67a4691db2b" />
Author
Owner

@MaoFeidu commented on GitHub (Nov 21, 2025):

Are you sure the API is correct and/or internet connection is valid - cannot replicate in current desktop build or docker build

Image Image

Root cause update & feature request
After further testing we found that the hard-coded base URL for the Moonshot provider is https://api.moonshot.ai.
Moonshot actually exposes two independent endpoints:

Region Base URL
Global https://api.moonshot.ai
China https://api.moonshot.cn

Keys generated on one side are not accepted by the other side, so the UI can never populate the model list if the user’s key belongs to the opposite endpoint.
Requested enhancement
Please add a “Base URL” selector (dropdown or text field) inside the Moonshot AI provider block with:
Two pre-filled choices
https://api.moonshot.ai (default, keep backward compatibility)
https://api.moonshot.cn
Allow custom URL input for future changes
Store the choice in settings.json under Provider->Moonshot->baseURL
This small change will let users pick the correct gateway without hacking the source or staying on the Generic-OpenAI workaround.
Thanks for considering!

The availability of api key and internet connection is tested and it's valid.

Image
@MaoFeidu commented on GitHub (Nov 21, 2025): > Are you sure the API is correct and/or internet connection is valid - cannot replicate in current desktop build or docker build > > <img alt="Image" width="1784" height="983" src="https://private-user-images.githubusercontent.com/16845892/517534971-c928b6a9-c68d-4c05-b2f4-80b53e6652f5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM3NzgwOTYsIm5iZiI6MTc2Mzc3Nzc5NiwicGF0aCI6Ii8xNjg0NTg5Mi81MTc1MzQ5NzEtYzkyOGI2YTktYzY4ZC00YzA1LWIyZjQtODBiNTNlNjY1MmY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTIyVDAyMTYzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBhODZmN2UyOGQ2ZDk2OWE5YzNhYzRkNDc3YTU1ZTUwZTYwNjMzMDI4NDc4MWU3NzdkNWNkY2JiM2Q0NmQ1ZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.n96_W94QERs69vCROKcMUkPQXSjRhm1olc6hSzcHkj0"> <img alt="Image" width="1517" height="1003" src="https://private-user-images.githubusercontent.com/16845892/517534972-98388cd9-4c14-42a9-b95d-d67a4691db2b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM3NzgwOTYsIm5iZiI6MTc2Mzc3Nzc5NiwicGF0aCI6Ii8xNjg0NTg5Mi81MTc1MzQ5NzItOTgzODhjZDktNGMxNC00MmE5LWI5NWQtZDY3YTQ2OTFkYjJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTExMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMTIyVDAyMTYzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzNmUxOGJlNmNiMDc4ZGI4MzExOWE2NjFmOTdkMThmNWYxODY3MjBjNTkwNzIwNGNlOTdlNjM5YjBhOWE1MTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.H8E-7m2VT0Hsvkf5Jj5nRqRbhUtClU5iu0DE-az6Yo4"> **Root cause update & feature request** After further testing we found that the hard-coded base URL for the Moonshot provider is https://api.moonshot.ai. Moonshot actually exposes two independent endpoints: | Region | Base URL | | ------ | ------------------------- | | Global | `https://api.moonshot.ai` | | China | `https://api.moonshot.cn` | Keys generated on one side are not accepted by the other side, so the UI can never populate the model list if the user’s key belongs to the opposite endpoint. **Requested enhancement** Please add a “Base URL” selector (dropdown or text field) inside the Moonshot AI provider block with: Two pre-filled choices https://api.moonshot.ai (default, keep backward compatibility) https://api.moonshot.cn Allow custom URL input for future changes Store the choice in settings.json under Provider->Moonshot->baseURL This small change will let users pick the correct gateway without hacking the source or staying on the Generic-OpenAI workaround. Thanks for considering! The availability of api key and internet connection is tested and it's valid. <img width="1099" height="623" alt="Image" src="https://github.com/user-attachments/assets/54e84afb-c3e9-4321-a4e0-7ef058a1a27d" />
yindo changed title from [BUG]: Moonshot AI provider shows empty model list in desktop v1.9.0 (Windows) to [GH-ISSUE #4674] [BUG]: Moonshot AI provider shows empty model list in desktop v1.9.0 (Windows) 2026-06-05 14:49:31 -04:00
Author
Owner

@thelinuxlich commented on GitHub (Mar 6, 2026):

is there a workaround?

<!-- gh-comment-id:4014406022 --> @thelinuxlich commented on GitHub (Mar 6, 2026): is there a workaround?
Author
Owner

@Sleepful commented on GitHub (Apr 25, 2026):

I believe this happens if you try to use a Kimi Coding plan key, instead you need to use per-use API key

<!-- gh-comment-id:4318454382 --> @Sleepful commented on GitHub (Apr 25, 2026): I believe this happens if you try to use a Kimi Coding plan key, instead you need to use per-use API key
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2962