Skip to content

[Bug]: Bedrock Nova 2 Lite fails with "extraneous key [textGenerationConfig]" error #17910

@sjmatta

Description

@sjmatta

What happened?

What happened?

When attempting to use bedrock/amazon.nova-2-lite-v1:0 through LiteLLM, requests fail with a Bedrock API error indicating that textGenerationConfig is not a valid parameter for Nova models.

Configuration:

- model_name: nova-2-lite
  litellm_params:
    model: bedrock/amazon.nova-2-lite-v1:0
    model_id: ${INFERENCE_PROFILE_ARN}

Request:

curl --location 'http://localhost:4000/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk-1234' \
--data '{
    "model": "nova-2-lite",
    "messages": [
        {"role": "user", "content": "Hello"}
    ]
}'

Relevant log output

litellm.ServiceUnavailableError: litellm.MidStreamFallbackError: litellm.BadRequestError: BedrockException - {"message":"Malformed input request: #: extraneous key [textGenerationConfig] is not permitted, reformat your input and try again."}. Received Model Group=nova-2-lite
Available Model Group Fallbacks=None

Root Cause:

LiteLLM's Bedrock handler is sending textGenerationConfig (used by other Bedrock models like Claude) instead of inferenceConfig (required by Nova models). According to AWS Nova API
documentation
, Nova models use a different parameter structure with inferenceConfig.

Expected Behavior:

The Bedrock provider should detect Nova models and use inferenceConfig instead of textGenerationConfig.

Additional Context:

Are you a ML Ops Team?

No

What LiteLLM version are you on?

v1.80.7

Twitter / LinkedIn details

No response

Relevant log output

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.80.7

Twitter / LinkedIn details

No response

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