BYOK + custom base URL: built-in Kimi K3 and K2.7-Code return 404, but K2.7-Code-Highspeed works

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

  1. Configure BYOK as above.
  2. Open a chat in Agent mode, select the built-in “Kimi K3” model.
  3. 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/models with my key returns kimi-k3 and kimi-k2.7-code in the list, context_length 1048576.
  • A direct curl chat completion with {"model":"kimi-k3"} against https://api.moonshot.cn/v1/chat/completions succeeds.
  • 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

Hey, thanks for the detailed report and the Request ID.

The built-in Kimi K3 and K2.7 Code entries in the catalog are models hosted by Cursor, so Override OpenAI Base URL doesn’t apply to them right now. Because of that, when OpenAI API Key is turned on, the request with your Moonshot key never reaches Moonshot at all, neither api.moonshot.cn nor api.moonshot.ai. That’s why you see a 404 and empty logs in Moonshot. The difference between the .cn and .ai endpoints isn’t related here. kimi-k2.7-code-highspeed works because that name doesn’t match any built-in model, so the request goes to your base URL as-is.

This is an issue we’re tracking, and I’ve passed your report to the team. For now, you can use these workarounds:

  1. For K2.7, keep using kimi-k2.7-code-highspeed.
  2. For Kimi K3, you can temporarily turn off OpenAI API Key in Cursor Settings > Models. Then K3 will work as a Cursor model and use your plan limits instead of your Moonshot key. Just note that this toggle affects all custom models, so turn it back on for those.
  3. If /v1/models with your key returns a different id for K3, not exactly kimi-k3, kimi-k3-low, kimi-k3-high, or kimi-k3-max, try adding it as a custom model. It should go to your base URL the same way as Highspeed.

There’s no ETA yet, but I’ll reply here when there’s an update. Related thread if helpful: Built-in Kimi K3 + Moonshot BYOK fails with resource-not-found; cannot add custom model kimi-k3 because name is reserved

Same root cause on Cursor Enterprise with Override OpenAI Base URL pointed at a company AI gateway (TrueFoundry), not Moonshot.

What worked for me: a custom model ID that did not match a Cursor catalog entry hit the gateway (verified with matching gateway usage + Cursor token-rate, not full model cost).

What broke after ~mid-October: the same pattern as this thread — once the name collides with / is treated as a built-in (Kimi family), Override Base URL stops applying, I get 404 / resource-not-found, and nothing reaches the gateway. Staff confirmation here matches what I see: built-in Kimi is Cursor-hosted; the override is ignored.

Ask: route by selection — custom/gateway models → Override Base URL; catalog models → Cursor when selected. Also please don’t reserve provider model IDs so BYOK cannot use the exact ID the gateway expects.

I’m filing a Feature Request for Enterprise gateway BYOK + Override Anthropic Base URL as well. Feature Request: https://forum.cursor.com/t/enterprise-byok-ai-gateway-built-ins-ignore-override-base-url-need-anthropic-override/175824?u=diego_parima

@Diego_Parima, thanks for the details.

For Kimi, this looks like the same issue as in this thread. If the model ID exactly matches a built-in name kimi-k3, kimi-k3-low, kimi-k3-high, kimi-k3-max, kimi-k2.7-code, Override OpenAI Base URL currently won’t apply to it, no matter where the URL points. I’ve passed your gateway setup to the team along with this report. Until this is fixed, it’s safer to use an ID that definitely doesn’t overlap with built-in models, for example with a provider prefix or via an alias on the gateway side.

At the same time, kimi-k3-fast doesn’t match any built-in name, so this issue shouldn’t affect it. If it’s failing for you right now:

  1. Open Cursor Settings > Models.
  2. Check that OpenAI API Key and Override OpenAI Base URL are still enabled and that the URL is still there.
  3. If everything is enabled and the error is still happening, send 1 to 2 Request IDs from failed chats menu ... in the top right of the chat > Copy Request ID.

I’ll handle the other points route by selection, Override Anthropic Base URL, and gateway BYOK for Enterprise in your feature request so we don’t mix threads: Enterprise BYOK + AI Gateway: built-ins ignore Override Base URL; need Anthropic override