AWS Bedrock Mantle

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Provider returned error: {“error”:{“code”:“validation_error”,“message”:“Failed to deserialize the JSON body into the target type: ?[6]: Invalid ‘tools’: missing field custom at line 1 column 108265”,“param”:null,“type”:“invalid_request_error”}}

Steps to Reproduce

I use AWS mantle endpoint in the open AI and with my secret

Operating System

MacOS

Version Information

Version: 3.13.6
VS Code Extension API: 1.128.0
Commit: c0f61a2f075ef9df63f57ab7b235df70390ccb90
Date: 2026-07-22T21:39:45.624Z
Layout: IDE
Build Type: Stable
Release Track: Nightly
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

For AI issues: add Request ID with privacy disabled

Request ID: 87d608bc-78e7-4ba8-b415-a4f7a1e0953f
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: {"error":{"code":"validation_error","message":"Failed to deserialize the JSON body into the target type: ?[6]: Invalid ‘tools’: missing field custom at line 1 column 108265","param":null,"type":"invalid_request_error"}}”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: {“error”:{“code”:“validation_error”,“message”:“Failed to deserialize the JSON body into the target type: ?[6]: Invalid ‘tools’: missing field custom at line 1 column 108265”,“param”:null,“type”:“invalid_request_error”}}
NonRetriableError: Provider Error Provider returned error: {“error”:{“code”:“validation_error”,“message”:“Failed to deserialize the JSON body into the target type: ?[6]: Invalid ‘tools’: missing field custom at line 1 column 108265”,“param”:null,“type”:“invalid_request_error”}}
at kcb (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9450:6779)
at QAr (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9450:5416)
at TRm (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9451:12006)
at Object.classify (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9451:16538)
at Tcb (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9451:5856)
at async TOa.runWithSharedTurnRunner (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9451:15890)
at async Pq.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12149:23004)
at async s1l.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:18421:15093)
at async s1l.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:18421:24917)
at async N5e.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:9615:2492)

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report with the request ID, that helps.

The Invalid 'tools': missing field custom error is coming from your endpoint while deserializing the request. It looks like a mismatch between the tools format Cursor sends and what an OpenAI-compatible endpoint via AWS Bedrock or Mantle expects. So this is about how we build the payload, not your config.

To narrow it down, a few questions:

  • Which model are you selecting via the Mantle endpoint?
  • You’re on the Nightly release track (3.13.6). Did this endpoint work before and then break after an update, or has it failed from the start? If it used to work, about which version did it stop working?
  • Does this happen for all models on this endpoint, or only a specific one?
  1. GPT 5.6 Sol
  2. I just tried to set this up today.
  3. I tried using Fable %, but whenever I hit request, it directly redirects to grok, even though I do have a pro plan.

Thanks for the details. This is a known bug on our side, not an issue with your config.

Cursor serializes the first tool in a new format {"type":"custom",...}, but OpenAI-compatible endpoints including AWS Bedrock and Mantle don’t accept it. They reject the request before it ever reaches the model. For most providers this shows up as missing field \function`, and for your Mantle proxy it shows up as missing field `custom``, but it’s the same root cause. We know about it, but I can’t share an ETA yet. Once there’s an update, I’ll reply in this thread.

Workaround for now:

  • Turn off the custom API key in settings and use a model hosted by Cursor (Auto, Composer, Claude). Those don’t go through your key and should work normally.

About Fable redirecting to grok:

  • First, fully disable the custom key and re-select the model. When the key is enabled, model routing can act weird.
  • If Fable still routes to grok with the key disabled, please open a separate thread for that so we can debug it separately and not mix it with this bug.