Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Summary
When using my own Moonshot API key with “Override OpenAI Base URL” set to https://api.moonshot.cn/v1, the built-in “Kimi K3” and “K2.7 Code” models always fail with a 404 Provider Error, while the built-in “K2.7 Code Highspeed” works fine with the exact same key and configuration.
Steps to Reproduce
Setup
- Cursor version: 3.24.18 (user setup)
- OS: Windows 11
- Settings → Models:
- OpenAI API Key: my Moonshot key (sk-…)
- “Use OpenAI API Key”: ON
- “Override OpenAI Base URL”: ON →
https://api.moonshot.cn/v1
- Model selected: built-in “Kimi K3” (also reproduces with built-in “K2.7 Code”)
Steps to reproduce
- Configure BYOK as above.
- Open a chat in Agent mode, select the built-in “Kimi K3” model.
- Send any message.
Expected Behavior
Expected behavior
The request reaches api.moonshot.cn using my key, just like “K2.7 Code Highspeed” does.
Actual behavior
Immediately fails with:
Provider Error — “We’re having trouble finding the resource you requested.”
Error details: providerStatusCode: 404, isRetryable: false
Request ID: 3fbd0148-a7aa-4867-a4a3-353f1d1075c9
Operating System
Windows 10/11
Version Information
IDE:
3.24.18 (user setup)
For AI issues: which model did you use?
Kimi-K3/Kimi-K2.7code
For AI issues: add Request ID with privacy disabled
Request ID: 3fbd0148-a7aa-4867-a4a3-353f1d1075c9 {“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“We’re having trouble finding the resource you requested. If the problem persists, please contact support.”,“isRetryable”:false,“additionalInfo”:{“providerStatusCode”:“404”},“buttons”:,“planChoices”:},“isExpected”:true} Provider Error We’re having trouble finding the resource you requested. If the problem persists, please contact support. NonRetriableError: Provider Error We’re having trouble finding the resource you requested. If the problem persists, please contact support. at SQv (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:8892:118042) at X1o._executeTurn (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:8892:137645) at async X1o.executeTurn (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:8892:126411) at async Zde.runAgentLoop (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:8886:76488) at async Lta.streamFromAgentBackend (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:18638:23097) at async Lta.getAgentStreamResponse (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:18638:46625) at async G1e._submitChatMaybeAbortCurrent (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:8860:4727) at async G1e.submitChatMaybeAbortCurrent (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:8855:75242) at async Qd (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:17766:88913)
Additional Information
Evidence that my key and the model are fine
curl https://api.moonshot.cn/v1/modelswith my key returnskimi-k3andkimi-k2.7-codein the list, context_length 1048576.- A direct
curlchat completion with{"model":"kimi-k3"}againsthttps://api.moonshot.cn/v1/chat/completionssucceeds. - The built-in “K2.7 Code Highspeed” entry works in Cursor with the same key — no record of the failing K3 requests appears in my api.moonshot.cn usage logs, which suggests the agent backend routes these two models to a different endpoint (possibly
api.moonshot.ai) instead of the overridden base URL.
Additional notes
- The error stack shows the request goes through the agent backend (
streamFromAgentBackend/runAgentLoop), so the client-side Override Base URL setting may not apply in Agent mode, or the backend uses its own hardcoded endpoint for these built-in entries. - Adding the model manually is blocked: “The model kimi-k3 is already available as Kimi K3”.
Hypothesis
The server-side model registry maps built-in Kimi K3 / K2.7-Code to the international endpoint (api.moonshot.ai), while Highspeed points to api.moonshot.cn. China-platform keys are not valid on the international endpoint, hence the 404.
Does this stop you from using Cursor
No - Cursor works, but with this issue