Custom DeepSeek model rejected by Cursor backend after previously working

Hello Cursor Support,

My custom DeepSeek integration was working normally before, but Cursor now rejects the model before the request reaches the DeepSeek API.

Environment:

- Operating system: Windows x64
- Cursor versions tested: 3.24.9 and 3.23.23
- Mode: Agent
- Custom model: deepseek-flash
- OpenAI-compatible base URL: https://api.deepseek.com
- Authentication: My own DeepSeek API key
- Request ID: 1403831d-cddf-4bc2-b3a3-3277d011e1a0

Error:

AI Model Not Found
Model name is not valid: "deepseek-flash"

Developer Tools shows that the error originates from Cursor's agent backend:

ActionRequiredError: AI Model Not Found Model name is not valid: "deepseek-flash"
at streamFromAgentBackend

The same error occurs in a new chat and after downgrading from Cursor 3.24.9 to 3.23.23. I removed and re-added the custom model, re-enabled my API key, confirmed the base URL, restarted Cursor, and tested again. The behavior did not change.

I also tested the legacy model identifier "deepseek-v4-flash", but Cursor rejected it with the same "Model name is not valid" error.

The current official DeepSeek API documentation lists "deepseek-flash" as a valid model identifier. The configured endpoint and API key previously worked in Cursor.

This appears to be server-side model validation because:

1. The error is produced by Cursor's streamFromAgentBackend.
2. It occurs before any request reaches the DeepSeek API.
3. Downgrading the desktop client does not change the behavior.
4. The same configuration worked previously.

There is also a separate Developer Tools warning:

[otel.error] writeInitialRequest — You can only call end() on a span once.

However, the blocking error is the model validation failure described above.

Could you please confirm:

1. Whether custom DeepSeek models are still supported in Cursor Agent.
2. Whether "deepseek-flash" is currently blocked by Cursor's server-side model catalog.
3. Whether this is a regression or an intentional restriction.
4. How I can restore my previously working BYOK DeepSeek configuration.
5. Whether another exact model identifier must now be used.

Please let me know if you need the full Developer Tools log or additional request IDs.

Thank you.

**Where does the bug appear (feature/product)?**

  • [x] Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)

**Describe the Bug**

A previously working DeepSeek BYOK configuration stopped working after updating Cursor.

When I select the custom DeepSeek model and send any message, Cursor immediately returns:

`Model name is not valid: “deepseek-flash”`

The same DeepSeek API key and model configuration worked normally before the Cursor update. Removing and re-adding the API key/model did not resolve the issue.

Cursor logs indicate that the error is returned through the agent backend during `streamFromAgentBackend` / `writeInitialRequest`, rather than being caused by the contents of the chat prompt.

I also downgraded Cursor, preserving my user data and configuration, but the same validation error remained. This suggests that the stored model configuration or server-side model validation may no longer accept the custom DeepSeek model identifier.


**Steps to Reproduce**

  1. Open Cursor on Windows.
  2. Open Cursor Settings and configure a DeepSeek API key using BYOK.
  3. Add or select the custom model with the identifier `deepseek-flash`.
  4. Open a new Agent chat.
  5. Select the DeepSeek model.
  6. Send any message.
  7. Cursor immediately returns: `Model name is not valid: “deepseek-flash”`.

The error also occurs in a completely new chat and is independent of the prompt contents.


**Expected Behavior**

Cursor should accept the configured DeepSeek BYOK model and send the request directly to the DeepSeek API, as it did before the update.

If `deepseek-flash` is no longer an accepted identifier, Cursor should either:

  1. preserve and migrate previously working custom model configurations;
  2. allow the current DeepSeek API model identifiers; or
  3. display the exact supported identifier and migration instructions instead of rejecting the request with a generic validation error.

**Screenshots / Screen Recordings**

I can attach:

  • A screenshot showing `Model name is not valid: “deepseek-flash”`.
  • Cursor Developer Tools logs containing the `streamFromAgentBackend` / `writeInitialRequest` error.
  • A screenshot of the DeepSeek BYOK configuration with the API key redacted.

**Operating System**

  • [x] Windows 10/11

Windows 11.


**Version Information**

```yaml
IDE:
Version: 3.24.9
VSCode Version: [paste the value from Cursor diagnostics if available]
Commit: [paste the commit value if available]

I also reproduced the same error after downgrading to Cursor 3.23.23 without deleting my user data or configuration.


For AI issues: which model did you use?

Custom BYOK model: deepseek-flash

Provider: DeepSeek

The model and API key worked before the Cursor update.


For AI issues: add Request ID with privacy disabled

Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1


Additional Information

  • The failure occurs in both existing and completely new chats.
  • Changing the chat prompt does not affect the error.
  • Removing and re-adding the DeepSeek API key/model did not fix it.
  • Reinstalling/downgrading Cursor while preserving user data did not fix it.
  • The API key must not be included in this public report.
  • Cursor Developer Tools logs show the request failing during the agent backend model-validation path.
  • This appears to be a model registry/BYOK validation issue rather than a DeepSeek API authentication failure.
  • Please confirm the currently supported DeepSeek model identifiers for BYOK and whether custom OpenAI-compatible DeepSeek endpoints remain supported.

Does this stop you from using Cursor?

  • Sometimes - I can sometimes use Cursor

Cursor itself opens and other models may remain available, but my configured DeepSeek BYOK workflow is completely blocked.

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Editor, Tab & Chat (autocomplete, Composer, in-editor agent)
  • Terminal & commands
  • Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)
  • MCP & tools
  • Cloud Agents & Automations (cursor.com/agents, scheduled/event)
  • BugBot & Code Review
  • Cursor CLI
  • Cursor Mobile
  • Remote (SSH / Dev Containers / WSL)
  • Account, billing & login
  • Something else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!

  1. …
  2. …
  3. …

Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

Done

Same here. This doesn’t look DeepSeek-specific.

I’m also getting Model name is not valid / AI Model Not Found on a custom (BYOK / OpenAI-compatible) model that used to work. Client downgrade / re-adding the model doesn’t help.

So it seems like a broader server-side validation / allowlist issue for custom models in Agent, not just deepseek-flash.

Hey, thanks for the detailed report and for filling out the template.

Good news: deepseek-flash isn’t blocked. Custom DeepSeek models are still supported in Agent, and that same model name is working for other users right now. The Model name is not valid error shows up when the request reaches us without your API key. In that case, Cursor treats the name as one of its built-in models and rejects it. In your case, it looks like the key stopped being attached to requests around the time you updated to 3.24.9.

Could you try this:

  1. Open Cursor Settings > Models > API Keys.
  2. Turn off the OpenAI API Key toggle, fully clear the key field, and paste your DeepSeek key again. It’s important to re-paste it, not just toggle it back on.
  3. Then make sure the OpenAI API Key toggle is turned on.
  4. Check that Override OpenAI Base URL is still enabled and points to https://api.deepseek.com/v1.
  5. Fully close Cursor with all windows closed, then open it again.
  6. Open a new chat in Agent, select deepseek-flash, and send a short message.

If after step 6 you still get Model name is not valid, please send a new Request ID and the exact Cursor version from Help > About, and we’ll dig deeper.

Turns out in one of their newest updates they added a new option ‘Use OpenAl API Key’ that you have to enable to use an OpenAI compatible endpoint. It’s asinine that they didn’t document it or inform users

Thanks @aliaz, exactly right. Confirming that deepseek-flash is not blocked, and custom DeepSeek models are supported in Agent. The Model name is not valid error shows up when the request reaches us without your API key, and Cursor then treats the name as a built-in model.

The trigger is that one of the recent updates added a separate Use OpenAI API Key toggle, and it now needs to be turned on explicitly so the key gets attached to requests again. For existing BYOK configs, it did not get enabled automatically, which is why things broke after the update.

What to do:

  1. Open Cursor Settings > Models > API Keys.
  2. Turn on Use OpenAI API Key.
  3. Check that your key is still there. If needed, paste it again and click Verify. Also make sure Override OpenAI Base URL is enabled and points to your DeepSeek endpoint.
  4. Fully close Cursor with all windows closed, then reopen it.
  5. Start a new chat in Agent, choose deepseek-flash, and send a short message.

@Daniel_Markiel, you’re seeing the same thing on another custom OpenAI-compatible endpoint, so these steps should work for you too.

I agree that existing configs silently stopping working after an update, with no notice about the new toggle, isn’t how this should work. I’ve passed it on to the team. I’ll post here if there’s an update. If the error still shows up after these steps, send a new Request ID and the exact version from Help > About.