Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
A single Fireworks AI custom model consistently fails with “Invalid API key. Unauthorized User API key” while other Fireworks custom models, configured identically with the same API key, work correctly.
Failing model: accounts/fireworks/models/deepseek-v4-pro-0813
Working models on the same key, same config, same session: accounts/fireworks/models/kimi-k3 and accounts/fireworks/models/glm-5p2
All requests egress through the agent.v1.AgentService “Run” stream to agentn.global.api5.cursor.sh. Plain chat and agent mode use the same service and host, so mode is not a variable. The failures return, field-for-field identical:
ConnectError code 16 [unauthenticated]
errorDetailsDebug: {“error”:“ERROR_BAD_USER_API_KEY”,“details”:{“title”:“Invalid API key.”,“detail”:“Unauthorized User API key”,“isRetryable”:false,“analyticsMetadata”:{“actionRequired”:“config”}},“isExpected”:true}
In each case the stream connects and a first chunk is received before the error. TTFB was 30ms, 99ms and 125ms.
Cursor support (ticket T-F66811) confirmed from their side that these request IDs do not show a completed handoff to the upstream provider the way a healthy custom-model call does, and characterized it as a config or routing rejection on Cursor’s path rather than a Fireworks 401.
Steps to Reproduce
- Settings > Models > API Keys. Enter a Fireworks API key in the OpenAI API Key field and enable Override OpenAI Base URL pointing at the Fireworks OpenAI-compatible endpoint.
- Add three custom models: accounts/fireworks/models/kimi-k3, accounts/fireworks/models/glm-5p2, accounts/fireworks/models/deepseek-v4-pro-0813. Enable all three.
- Select kimi-k3 in the model picker and send “ping”. It answers normally.
- Select deepseek-v4-pro-0813 and send “ping”. It fails with “Invalid API key. Unauthorized User API key”.
- Repeat step 4 in a plain chat thread rather than an agent thread. Same failure.
Steps 3 and 4 minutes apart on the same key and same config is the control that isolates the model string as the only variable.
Expected Behavior
accounts/fireworks/models/deepseek-v4-pro-0813 should return a completion, as its sibling Fireworks models do on the identical key and configuration. The model is served on my Fireworks account and has real successful usage — 14.4M tokens on Aug 28 — so the credential and the model string are both valid.
Operating System
MacOS
Version Information
Cursor IDE 3.18.9
For AI issues: which model did you use?
accounts/fireworks/models/deepseek-v4-pro-0813 (custom model via Fireworks AI BYOK)
For AI issues: add Request ID with privacy disabled
9343eafa-37d3-4676-bece-7a8980bb4fcc agent thread, 12:21 Pacific, FAIL
77d6ba54-0df3-4a15-8b22-839058dd70b7 agent thread, 13:04 Pacific, FAIL
3d2deee4-4ae3-4b86-9c42-80f0cd9efd77 plain chat, ~13:15 Pacific, FAIL
c845c483 (truncated) kimi-k3, 11:12 Pacific, SUCCESS - control
Additional Information
Evidence that this is not the key or the Fireworks account:
- The same key succeeds on sibling custom models through the identical transport, minutes apart.
- Fireworks’ response-status analytics filtered to this model over 14 days shows only 200 and 429 responses. Account-wide over the same window: 200, 299, 400, 429 and 499. No 401 or 403 has ever appeared. If Fireworks had rejected the credential it would show there.
The open question: is there a model allowlist, name-parsing step, or routing table on the BYOK path that treats this model string differently from accounts/fireworks/models/kimi-k3? The “actionRequired”:“config” metadata suggests the service concluded my configuration is wrong, which fits a model-string routing mismatch better than a credential problem.
Does this stop you from using Cursor
No - Cursor works, but with this issue