Skip to content

Unsupported parameter(s): prompt_cache_key - Claude Code

Quick fix

Upgrade cc-switch to the latest version, fixing prompt_cache_key not being stripped automatically when forwarding to the Nvidia API.

Error output
API Error: 400 Validation: Unsupported parameter(s): prompt_cache_key

When cc-switch forwards Claude Code requests to the Nvidia API (models such as glm4.7 and kimi-k2.5), the Nvidia OpenAI-compatible endpoint does not support the prompt_cache_key parameter, producing an HTTP 400. In cc-switch 3.13.0, the rectifier did not filter that parameter automatically.

  1. Upgrade cc-switch past 3.13.0. Later versions fixed removing prompt_cache_key automatically when forwarding over the OpenAI protocol.

  2. If you cannot upgrade yet, avoid the cc-switch "open terminal" button. With the local proxy on, launch Claude Code from a system terminal (PowerShell or Cmd) instead.

ToolClaude Code
VersionUnknown
PlatformsmacOSWindows
Why do kimi or glm models on the Nvidia API produce this error?
Because the Nvidia API endpoint does not support the prompt_cache_key parameter, and cc-switch 3.13.0 and earlier did not filter it out when forwarding the request.
Is there a workaround before the fixed version ships?
Users report that avoiding the cc-switch "open terminal" button and opening Claude Code through PowerShell or Cmd with the local proxy on works around it.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.