Skip to content

[Bug]: v1/messages now supports system prompt as well in the messages array. This breaks AWS Bedrock #29698

Closed

Description

@tanmaypandey7

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Anthropic recently added support to pass "role": "system" info in messages list.
announcement article - https://www.anthropic.com/news/claude-opus-4-8

The Messages API now accepts system entries inside the messages array.

however, requests send to AWS bedrock have started breaking with 400 error because it doesnt really support this format. Requests coming into LiteLLM will have to be formatted so that bedrock (and other provides i'm guessing) can consume it.
bedrock error-

{
    "error": {
        "message": "{\"message\":\"Guardrail was enabled but input is in incorrect format.\"}. Received Model Group=Dummy Model \nAvailable Model Group Fallbacks=None",
        "type": "None",
        "param": "None",
        "code": "400"
    }
}

traceback -

{
  "message": "litellm.proxy.proxy_server.anthropic_response(): Exception occured - 400: {'error': 'anthropic_messages: Invalid model name passed in model=Test Model. Call `/v1/models` to view available models for your key.'}",
  "level": "ERROR",
  "timestamp": "2026-06-04T19:25:54.312579",
  "error": "anthropic_messages: Invalid model name passed in model=Test Model. Call `/v1/models` to view available models for your key.",
  "component": "LiteLLM Proxy",
  "logger": "endpoints.py:121",
  "stacktrace": "Traceback (most recent call last):\n  File \"/app/.venv/lib/python3.13/site-packages/litellm/proxy/anthropic_endpoints/endpoints.py\", line 53, in anthropic_response\n    result = await base_llm_response_processor.base_process_llm_request(\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n     ...<16 lines>...\n    )\n    ^\n  File \"/app/.venv/lib/python3.13/site-packages/litellm/proxy/common_request_processing.py\", line 1054, in base_process_llm_request\n    llm_call = await route_request(\n               ^^^^^^^^^^^^^^^^^^^^\n     ...<5 lines>...\n    )\n    ^\n  File \"/app/.venv/lib/python3.13/site-packages/litellm/proxy/route_llm_request.py\", line 567, in route_request\n    raise ProxyModelNotFoundError(\n     ...<2 lines>...\n    )\nlitellm.proxy.route_llm_request.ProxyModelNotFoundError: 400: {'error': 'anthropic_messages: Invalid model name passed in model=Test Model. Call `/v1/models` to view available models for your key.'}"
}

Steps to Reproduce

deploy litellm, connect it to bedrock and send a curl
curl -X POST http://localhost:4000/v1/messages
-H "Content-Type: application/json"
-H "Authorization: Bearer KEY"
-d '{
"model": "Test Model",
"max_tokens": 100,
"messages": [
{"role": "user", "content": "hello"},
{"role": "system", "content": "You are a helpful assistant."}
]
}'

What part of LiteLLM is this about?

API

What LiteLLM version are you on ?

v1.83.14

Activity

  1. hclsys commented on Jun 4, 2026

    @hclsys
    Contributor

    PR up: #29709. hoists role=system out of messages[] into the top-level system field before bedrock/etc see it. 6 new tests + negative-test verified.

  2. added a commit that references this issue on Jun 18, 2026
  3. added a commit that references this issue on Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions