Agents: AWS Bedrock with lite-llm

Describe the problem/error/question

Since 2.43.0 Agents using AWS Bedrock via lite-llm and openai creds via modified base url, gives the error below.

What is the error message (if any)?

litellm.UnsupportedParamsError: bedrock does not support parameters: [‘prompt_cache_key’], for model=eu.anthropic.claude-sonnet-5. To drop these, set `litellm.drop_params=True` or for proxy: `litellm_settings: drop_params: true` . If you want to use these params dynamically send allowed_openai_params=[‘prompt_cache_key’] in your request.. Received Model Group=claude-sonnet-5 Available Model Group Fallbacks=None

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Information on your n8n setup

  • n8n version: 2.43.1
  • Database (default: SQLite): Postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: EC2 AWS AMI Linux

@Kool_Baudrillard

Do this

in your litellm config file for the respective model

Thx,

that´s what the error states. But has something changed from 2.42.0 to 2.43.0?

This is since the latest beta

This is possible.
I had encountered this from other Open-AI and Anthropic compatible providers as well

@Kool_Baudrillard looks like it. The error shows n8n is now sending prompt_cache_key, and it worked for you on 2.42, so 2.43 probably started adding it on the OpenAI-compatible path. Bedrock rejects it.

Your GitHub issue is the right place for the real fix. Until then, if you don’t want to drop params globally, you can drop just that one key on the Bedrock model in your LiteLLM config:

- model_name: claude-sonnet-5
  litellm_params:
    model: bedrock/eu.anthropic.claude-sonnet-5
    additional_drop_params: ["prompt_cache_key"]

That way other unsupported params still error loudly instead of being silently dropped. Pinning n8n to 2.42.x also works if you’d rather not touch the proxy for now.